Commit aa2e2cb1 authored by Finn Thain's avatar Finn Thain Committed by Martin K. Petersen

ncr5380: Fix and cleanup scsi_host_template initializers

Add missing .module initializer. Use distinct .proc_name values for the
g_NCR5380 and g_NCR5380_mmio modules. Remove pointless CAN_QUEUE and
CMD_PER_LUN override macros. Cleanup whitespace and code style.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bf1a0c6f
...@@ -781,7 +781,7 @@ static struct scsi_host_template atari_scsi_template = { ...@@ -781,7 +781,7 @@ static struct scsi_host_template atari_scsi_template = {
.eh_abort_handler = atari_scsi_abort, .eh_abort_handler = atari_scsi_abort,
.eh_bus_reset_handler = atari_scsi_bus_reset, .eh_bus_reset_handler = atari_scsi_bus_reset,
.this_id = 7, .this_id = 7,
.use_clustering = DISABLE_CLUSTERING .use_clustering = DISABLE_CLUSTERING,
}; };
static int __init atari_scsi_probe(struct platform_device *pdev) static int __init atari_scsi_probe(struct platform_device *pdev)
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
static struct scsi_host_template dmx3191d_driver_template = { static struct scsi_host_template dmx3191d_driver_template = {
.module = THIS_MODULE,
.proc_name = DMX3191D_DRIVER_NAME, .proc_name = DMX3191D_DRIVER_NAME,
.name = "Domex DMX3191D", .name = "Domex DMX3191D",
.info = NCR5380_info, .info = NCR5380_info,
......
...@@ -436,7 +436,7 @@ static int dtc_release(struct Scsi_Host *shost) ...@@ -436,7 +436,7 @@ static int dtc_release(struct Scsi_Host *shost)
} }
static struct scsi_host_template driver_template = { static struct scsi_host_template driver_template = {
.name = "DTC 3180/3280 ", .name = "DTC 3180/3280",
.detect = dtc_detect, .detect = dtc_detect,
.release = dtc_release, .release = dtc_release,
.proc_name = "dtc3x80", .proc_name = "dtc3x80",
...@@ -447,10 +447,10 @@ static struct scsi_host_template driver_template = { ...@@ -447,10 +447,10 @@ static struct scsi_host_template driver_template = {
.eh_abort_handler = dtc_abort, .eh_abort_handler = dtc_abort,
.eh_bus_reset_handler = dtc_bus_reset, .eh_bus_reset_handler = dtc_bus_reset,
.bios_param = dtc_biosparam, .bios_param = dtc_biosparam,
.can_queue = CAN_QUEUE, .can_queue = 32,
.this_id = 7, .this_id = 7,
.sg_tablesize = SG_ALL, .sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN, .cmd_per_lun = 2,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
}; };
#include "scsi_module.c" #include "scsi_module.c"
...@@ -10,14 +10,6 @@ ...@@ -10,14 +10,6 @@
#ifndef DTC3280_H #ifndef DTC3280_H
#define DTC3280_H #define DTC3280_H
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
#ifndef CAN_QUEUE
#define CAN_QUEUE 32
#endif
#define NCR5380_implementation_fields \ #define NCR5380_implementation_fields \
void __iomem *base void __iomem *base
......
...@@ -305,7 +305,6 @@ static int __init generic_NCR5380_detect(struct scsi_host_template *tpnt) ...@@ -305,7 +305,6 @@ static int __init generic_NCR5380_detect(struct scsi_host_template *tpnt)
} }
} }
#endif #endif
tpnt->proc_name = "g_NCR5380";
for (count = 0; current_override < NO_OVERRIDES; ++current_override) { for (count = 0; current_override < NO_OVERRIDES; ++current_override) {
if (!(overrides[current_override].NCR5380_map_name)) if (!(overrides[current_override].NCR5380_map_name))
...@@ -715,6 +714,7 @@ static int generic_NCR5380_dma_xfer_len(struct scsi_cmnd *cmd) ...@@ -715,6 +714,7 @@ static int generic_NCR5380_dma_xfer_len(struct scsi_cmnd *cmd)
#include "NCR5380.c" #include "NCR5380.c"
static struct scsi_host_template driver_template = { static struct scsi_host_template driver_template = {
.proc_name = DRV_MODULE_NAME,
.show_info = generic_NCR5380_show_info, .show_info = generic_NCR5380_show_info,
.name = "Generic NCR5380/NCR53C400 SCSI", .name = "Generic NCR5380/NCR53C400 SCSI",
.detect = generic_NCR5380_detect, .detect = generic_NCR5380_detect,
...@@ -724,10 +724,10 @@ static struct scsi_host_template driver_template = { ...@@ -724,10 +724,10 @@ static struct scsi_host_template driver_template = {
.eh_abort_handler = generic_NCR5380_abort, .eh_abort_handler = generic_NCR5380_abort,
.eh_bus_reset_handler = generic_NCR5380_bus_reset, .eh_bus_reset_handler = generic_NCR5380_bus_reset,
.bios_param = NCR5380_BIOSPARAM, .bios_param = NCR5380_BIOSPARAM,
.can_queue = CAN_QUEUE, .can_queue = 16,
.this_id = 7, .this_id = 7,
.sg_tablesize = SG_ALL, .sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN, .cmd_per_lun = 2,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
}; };
......
...@@ -21,18 +21,11 @@ ...@@ -21,18 +21,11 @@
#define NCR5380_BIOSPARAM NULL #define NCR5380_BIOSPARAM NULL
#endif #endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
#ifndef CAN_QUEUE
#define CAN_QUEUE 16
#endif
#define __STRVAL(x) #x #define __STRVAL(x) #x
#define STRVAL(x) __STRVAL(x) #define STRVAL(x) __STRVAL(x)
#ifndef SCSI_G_NCR5380_MEM #ifndef SCSI_G_NCR5380_MEM
#define DRV_MODULE_NAME "g_NCR5380"
#define NCR5380_map_type int #define NCR5380_map_type int
#define NCR5380_map_name port #define NCR5380_map_name port
...@@ -53,6 +46,7 @@ ...@@ -53,6 +46,7 @@
#else #else
/* therefore SCSI_G_NCR5380_MEM */ /* therefore SCSI_G_NCR5380_MEM */
#define DRV_MODULE_NAME "g_NCR5380_mmio"
#define NCR5380_map_type unsigned long #define NCR5380_map_type unsigned long
#define NCR5380_map_name base #define NCR5380_map_name base
......
...@@ -322,7 +322,7 @@ static struct scsi_host_template mac_scsi_template = { ...@@ -322,7 +322,7 @@ static struct scsi_host_template mac_scsi_template = {
.this_id = 7, .this_id = 7,
.sg_tablesize = SG_ALL, .sg_tablesize = SG_ALL,
.cmd_per_lun = 2, .cmd_per_lun = 2,
.use_clustering = DISABLE_CLUSTERING .use_clustering = DISABLE_CLUSTERING,
}; };
static int __init mac_scsi_probe(struct platform_device *pdev) static int __init mac_scsi_probe(struct platform_device *pdev)
......
...@@ -557,10 +557,10 @@ static struct scsi_host_template driver_template = { ...@@ -557,10 +557,10 @@ static struct scsi_host_template driver_template = {
.eh_abort_handler = pas16_abort, .eh_abort_handler = pas16_abort,
.eh_bus_reset_handler = pas16_bus_reset, .eh_bus_reset_handler = pas16_bus_reset,
.bios_param = pas16_biosparam, .bios_param = pas16_biosparam,
.can_queue = CAN_QUEUE, .can_queue = 32,
.this_id = 7, .this_id = 7,
.sg_tablesize = SG_ALL, .sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN, .cmd_per_lun = 2,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
}; };
#include "scsi_module.c" #include "scsi_module.c"
......
...@@ -95,14 +95,6 @@ ...@@ -95,14 +95,6 @@
#define OPERATION_MODE_1 0xec03 #define OPERATION_MODE_1 0xec03
#define IO_CONFIG_3 0xf002 #define IO_CONFIG_3 0xf002
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
#ifndef CAN_QUEUE
#define CAN_QUEUE 32
#endif
#define NCR5380_implementation_fields /* none */ #define NCR5380_implementation_fields /* none */
#define PAS16_io_port(reg) (instance->io_port + pas16_offset[(reg)]) #define PAS16_io_port(reg) (instance->io_port + pas16_offset[(reg)])
......
...@@ -469,7 +469,7 @@ static struct scsi_host_template sun3_scsi_template = { ...@@ -469,7 +469,7 @@ static struct scsi_host_template sun3_scsi_template = {
.this_id = 7, .this_id = 7,
.sg_tablesize = SG_NONE, .sg_tablesize = SG_NONE,
.cmd_per_lun = 2, .cmd_per_lun = 2,
.use_clustering = DISABLE_CLUSTERING .use_clustering = DISABLE_CLUSTERING,
}; };
static int __init sun3_scsi_probe(struct platform_device *pdev) static int __init sun3_scsi_probe(struct platform_device *pdev)
......
...@@ -401,10 +401,10 @@ static struct scsi_host_template driver_template = { ...@@ -401,10 +401,10 @@ static struct scsi_host_template driver_template = {
.eh_abort_handler = t128_abort, .eh_abort_handler = t128_abort,
.eh_bus_reset_handler = t128_bus_reset, .eh_bus_reset_handler = t128_bus_reset,
.bios_param = t128_biosparam, .bios_param = t128_biosparam,
.can_queue = CAN_QUEUE, .can_queue = 32,
.this_id = 7, .this_id = 7,
.sg_tablesize = SG_ALL, .sg_tablesize = SG_ALL,
.cmd_per_lun = CMD_PER_LUN, .cmd_per_lun = 2,
.use_clustering = DISABLE_CLUSTERING, .use_clustering = DISABLE_CLUSTERING,
}; };
#include "scsi_module.c" #include "scsi_module.c"
...@@ -67,14 +67,6 @@ ...@@ -67,14 +67,6 @@
#define T_DATA_REG_OFFSET 0x1e00 /* rw 512 bytes long */ #define T_DATA_REG_OFFSET 0x1e00 /* rw 512 bytes long */
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
#ifndef CAN_QUEUE
#define CAN_QUEUE 32
#endif
#define NCR5380_implementation_fields \ #define NCR5380_implementation_fields \
void __iomem *base void __iomem *base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment