diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:12:00 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:09 -0500 |
commit | d572f65fdf78a6dcb55b86ad8684f88830bf2e08 (patch) | |
tree | c2a690e481eabd36133589b0bd26d16e640dcf3a | |
parent | a9c2dc43c14cc9e9333d451bc4db8a827a695332 (diff) |
ncr5380: Remove pointless compiler command line override macros
Compile-time override of scsi host defaults is pointless for drivers that
provide module parameters and __setup options for that. Too many macros make
the code hard to read so remove them.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/scsi/atari_scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/atari_scsi.h | 3 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.c | 19 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.h | 16 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.c | 20 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.h | 18 |
6 files changed, 20 insertions, 58 deletions
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 1022a391c82a..0e3a9cc40c94 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -611,7 +611,7 @@ static int __init atari_scsi_detect(struct scsi_host_template *host) | |||
611 | 611 | ||
612 | #ifdef SUPPORT_TAGS | 612 | #ifdef SUPPORT_TAGS |
613 | if (setup_use_tagged_queuing < 0) | 613 | if (setup_use_tagged_queuing < 0) |
614 | setup_use_tagged_queuing = DEFAULT_USE_TAGGED_QUEUING; | 614 | setup_use_tagged_queuing = 0; |
615 | #endif | 615 | #endif |
616 | #ifdef REAL_DMA | 616 | #ifdef REAL_DMA |
617 | /* If running on a Falcon and if there's TT-Ram (i.e., more than one | 617 | /* If running on a Falcon and if there's TT-Ram (i.e., more than one |
diff --git a/drivers/scsi/atari_scsi.h b/drivers/scsi/atari_scsi.h index 24e854590dc4..41b7cd7d36b8 100644 --- a/drivers/scsi/atari_scsi.h +++ b/drivers/scsi/atari_scsi.h | |||
@@ -36,9 +36,6 @@ | |||
36 | #define ATARI_FALCON_CMD_PER_LUN 1 | 36 | #define ATARI_FALCON_CMD_PER_LUN 1 |
37 | #define ATARI_FALCON_SG_TABLESIZE SG_NONE | 37 | #define ATARI_FALCON_SG_TABLESIZE SG_NONE |
38 | 38 | ||
39 | #define DEFAULT_USE_TAGGED_QUEUING 0 | ||
40 | |||
41 | |||
42 | #define NCR5380_implementation_fields /* none */ | 39 | #define NCR5380_implementation_fields /* none */ |
43 | 40 | ||
44 | #define NCR5380_read(reg) atari_scsi_reg_read( reg ) | 41 | #define NCR5380_read(reg) atari_scsi_reg_read( reg ) |
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index a27216d534ed..f00c987478ec 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
@@ -177,13 +177,12 @@ int __init macscsi_detect(struct scsi_host_template * tpnt) | |||
177 | if (macintosh_config->scsi_type != MAC_SCSI_OLD) | 177 | if (macintosh_config->scsi_type != MAC_SCSI_OLD) |
178 | return( 0 ); | 178 | return( 0 ); |
179 | 179 | ||
180 | /* setup variables */ | 180 | if (setup_can_queue > 0) |
181 | tpnt->can_queue = | 181 | tpnt->can_queue = setup_can_queue; |
182 | (setup_can_queue > 0) ? setup_can_queue : CAN_QUEUE; | 182 | if (setup_cmd_per_lun > 0) |
183 | tpnt->cmd_per_lun = | 183 | tpnt->cmd_per_lun = setup_cmd_per_lun; |
184 | (setup_cmd_per_lun > 0) ? setup_cmd_per_lun : CMD_PER_LUN; | 184 | if (setup_sg_tablesize >= 0) |
185 | tpnt->sg_tablesize = | 185 | tpnt->sg_tablesize = setup_sg_tablesize; |
186 | (setup_sg_tablesize >= 0) ? setup_sg_tablesize : SG_TABLESIZE; | ||
187 | 186 | ||
188 | if (setup_hostid >= 0) | 187 | if (setup_hostid >= 0) |
189 | tpnt->this_id = setup_hostid; | 188 | tpnt->this_id = setup_hostid; |
@@ -194,7 +193,7 @@ int __init macscsi_detect(struct scsi_host_template * tpnt) | |||
194 | 193 | ||
195 | #ifdef SUPPORT_TAGS | 194 | #ifdef SUPPORT_TAGS |
196 | if (setup_use_tagged_queuing < 0) | 195 | if (setup_use_tagged_queuing < 0) |
197 | setup_use_tagged_queuing = USE_TAGGED_QUEUING; | 196 | setup_use_tagged_queuing = 0; |
198 | #endif | 197 | #endif |
199 | 198 | ||
200 | /* Once we support multiple 5380s (e.g. DuoDock) we'll do | 199 | /* Once we support multiple 5380s (e.g. DuoDock) we'll do |
@@ -496,10 +495,10 @@ static struct scsi_host_template driver_template = { | |||
496 | .queuecommand = macscsi_queue_command, | 495 | .queuecommand = macscsi_queue_command, |
497 | .eh_abort_handler = macscsi_abort, | 496 | .eh_abort_handler = macscsi_abort, |
498 | .eh_bus_reset_handler = macscsi_bus_reset, | 497 | .eh_bus_reset_handler = macscsi_bus_reset, |
499 | .can_queue = CAN_QUEUE, | 498 | .can_queue = 16, |
500 | .this_id = 7, | 499 | .this_id = 7, |
501 | .sg_tablesize = SG_ALL, | 500 | .sg_tablesize = SG_ALL, |
502 | .cmd_per_lun = CMD_PER_LUN, | 501 | .cmd_per_lun = 2, |
503 | .use_clustering = DISABLE_CLUSTERING | 502 | .use_clustering = DISABLE_CLUSTERING |
504 | }; | 503 | }; |
505 | 504 | ||
diff --git a/drivers/scsi/mac_scsi.h b/drivers/scsi/mac_scsi.h index 66b34dbdc0d0..4eed4a75160b 100644 --- a/drivers/scsi/mac_scsi.h +++ b/drivers/scsi/mac_scsi.h | |||
@@ -17,22 +17,6 @@ | |||
17 | 17 | ||
18 | #ifndef ASM | 18 | #ifndef ASM |
19 | 19 | ||
20 | #ifndef CMD_PER_LUN | ||
21 | #define CMD_PER_LUN 2 | ||
22 | #endif | ||
23 | |||
24 | #ifndef CAN_QUEUE | ||
25 | #define CAN_QUEUE 16 | ||
26 | #endif | ||
27 | |||
28 | #ifndef SG_TABLESIZE | ||
29 | #define SG_TABLESIZE SG_NONE | ||
30 | #endif | ||
31 | |||
32 | #ifndef USE_TAGGED_QUEUING | ||
33 | #define USE_TAGGED_QUEUING 0 | ||
34 | #endif | ||
35 | |||
36 | #include <scsi/scsicam.h> | 20 | #include <scsi/scsicam.h> |
37 | 21 | ||
38 | #define NCR5380_implementation_fields /* none */ | 22 | #define NCR5380_implementation_fields /* none */ |
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c index 9bae5f6122a7..12a991b19e58 100644 --- a/drivers/scsi/sun3_scsi.c +++ b/drivers/scsi/sun3_scsi.c | |||
@@ -198,12 +198,12 @@ static int __init sun3scsi_detect(struct scsi_host_template *tpnt) | |||
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | /* setup variables */ | 200 | /* setup variables */ |
201 | tpnt->can_queue = | 201 | if (setup_can_queue > 0) |
202 | (setup_can_queue > 0) ? setup_can_queue : CAN_QUEUE; | 202 | tpnt->can_queue = setup_can_queue; |
203 | tpnt->cmd_per_lun = | 203 | if (setup_cmd_per_lun > 0) |
204 | (setup_cmd_per_lun > 0) ? setup_cmd_per_lun : CMD_PER_LUN; | 204 | tpnt->cmd_per_lun = setup_cmd_per_lun; |
205 | tpnt->sg_tablesize = | 205 | if (setup_sg_tablesize >= 0) |
206 | (setup_sg_tablesize >= 0) ? setup_sg_tablesize : SG_TABLESIZE; | 206 | tpnt->sg_tablesize = setup_sg_tablesize; |
207 | 207 | ||
208 | if (setup_hostid >= 0) | 208 | if (setup_hostid >= 0) |
209 | tpnt->this_id = setup_hostid; | 209 | tpnt->this_id = setup_hostid; |
@@ -257,7 +257,7 @@ static int __init sun3scsi_detect(struct scsi_host_template *tpnt) | |||
257 | #endif | 257 | #endif |
258 | #ifdef SUPPORT_TAGS | 258 | #ifdef SUPPORT_TAGS |
259 | if (setup_use_tagged_queuing < 0) | 259 | if (setup_use_tagged_queuing < 0) |
260 | setup_use_tagged_queuing = USE_TAGGED_QUEUING; | 260 | setup_use_tagged_queuing = 1; |
261 | #endif | 261 | #endif |
262 | 262 | ||
263 | instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); | 263 | instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata)); |
@@ -683,10 +683,10 @@ static struct scsi_host_template driver_template = { | |||
683 | .queuecommand = sun3scsi_queue_command, | 683 | .queuecommand = sun3scsi_queue_command, |
684 | .eh_abort_handler = sun3scsi_abort, | 684 | .eh_abort_handler = sun3scsi_abort, |
685 | .eh_bus_reset_handler = sun3scsi_bus_reset, | 685 | .eh_bus_reset_handler = sun3scsi_bus_reset, |
686 | .can_queue = CAN_QUEUE, | 686 | .can_queue = 16, |
687 | .this_id = 7, | 687 | .this_id = 7, |
688 | .sg_tablesize = SG_TABLESIZE, | 688 | .sg_tablesize = SG_NONE, |
689 | .cmd_per_lun = CMD_PER_LUN, | 689 | .cmd_per_lun = 2, |
690 | .use_clustering = DISABLE_CLUSTERING | 690 | .use_clustering = DISABLE_CLUSTERING |
691 | }; | 691 | }; |
692 | 692 | ||
diff --git a/drivers/scsi/sun3_scsi.h b/drivers/scsi/sun3_scsi.h index 3b8a05ca3625..d616c9539cec 100644 --- a/drivers/scsi/sun3_scsi.h +++ b/drivers/scsi/sun3_scsi.h | |||
@@ -31,25 +31,7 @@ | |||
31 | 31 | ||
32 | #define IOBASE_SUN3_VMESCSI 0xff200000 | 32 | #define IOBASE_SUN3_VMESCSI 0xff200000 |
33 | 33 | ||
34 | #ifndef CMD_PER_LUN | ||
35 | #define CMD_PER_LUN 2 | ||
36 | #endif | ||
37 | |||
38 | #ifndef CAN_QUEUE | ||
39 | #define CAN_QUEUE 16 | ||
40 | #endif | ||
41 | |||
42 | #ifndef SG_TABLESIZE | ||
43 | #define SG_TABLESIZE SG_NONE | ||
44 | #endif | ||
45 | |||
46 | #ifndef MAX_TAGS | ||
47 | #define MAX_TAGS 32 | 34 | #define MAX_TAGS 32 |
48 | #endif | ||
49 | |||
50 | #ifndef USE_TAGGED_QUEUING | ||
51 | #define USE_TAGGED_QUEUING 1 | ||
52 | #endif | ||
53 | 35 | ||
54 | #include <scsi/scsicam.h> | 36 | #include <scsi/scsicam.h> |
55 | 37 | ||