diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-01-03 00:05:48 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-01-06 21:43:03 -0500 |
commit | aa2e2cb1dde0e72e039f94210fb17e73661a6351 (patch) | |
tree | 531b741244cc154f7a8ff7aa7b0c43fa01b93e92 | |
parent | bf1a0c6f8f2c1959082f1b55b907dde100c87501 (diff) |
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: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ondrej Zary <linux@rainbow-software.org>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/atari_scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/dmx3191d.c | 1 | ||||
-rw-r--r-- | drivers/scsi/dtc.c | 32 | ||||
-rw-r--r-- | drivers/scsi/dtc.h | 8 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.c | 26 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.h | 10 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.c | 28 | ||||
-rw-r--r-- | drivers/scsi/pas16.c | 32 | ||||
-rw-r--r-- | drivers/scsi/pas16.h | 8 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.c | 6 | ||||
-rw-r--r-- | drivers/scsi/t128.c | 32 | ||||
-rw-r--r-- | drivers/scsi/t128.h | 8 |
12 files changed, 82 insertions, 111 deletions
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 2ba075749326..e263aa30282b 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -781,7 +781,7 @@ static struct scsi_host_template atari_scsi_template = { | |||
781 | .eh_abort_handler = atari_scsi_abort, | 781 | .eh_abort_handler = atari_scsi_abort, |
782 | .eh_bus_reset_handler = atari_scsi_bus_reset, | 782 | .eh_bus_reset_handler = atari_scsi_bus_reset, |
783 | .this_id = 7, | 783 | .this_id = 7, |
784 | .use_clustering = DISABLE_CLUSTERING | 784 | .use_clustering = DISABLE_CLUSTERING, |
785 | }; | 785 | }; |
786 | 786 | ||
787 | static int __init atari_scsi_probe(struct platform_device *pdev) | 787 | static int __init atari_scsi_probe(struct platform_device *pdev) |
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 05402830defe..7f66c9e76c3b 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
@@ -49,6 +49,7 @@ | |||
49 | 49 | ||
50 | 50 | ||
51 | static struct scsi_host_template dmx3191d_driver_template = { | 51 | static struct scsi_host_template dmx3191d_driver_template = { |
52 | .module = THIS_MODULE, | ||
52 | .proc_name = DMX3191D_DRIVER_NAME, | 53 | .proc_name = DMX3191D_DRIVER_NAME, |
53 | .name = "Domex DMX3191D", | 54 | .name = "Domex DMX3191D", |
54 | .info = NCR5380_info, | 55 | .info = NCR5380_info, |
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 6c96dad5cf23..d74661458f15 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c | |||
@@ -436,21 +436,21 @@ static int dtc_release(struct Scsi_Host *shost) | |||
436 | } | 436 | } |
437 | 437 | ||
438 | static struct scsi_host_template driver_template = { | 438 | static struct scsi_host_template driver_template = { |
439 | .name = "DTC 3180/3280 ", | 439 | .name = "DTC 3180/3280", |
440 | .detect = dtc_detect, | 440 | .detect = dtc_detect, |
441 | .release = dtc_release, | 441 | .release = dtc_release, |
442 | .proc_name = "dtc3x80", | 442 | .proc_name = "dtc3x80", |
443 | .show_info = dtc_show_info, | 443 | .show_info = dtc_show_info, |
444 | .write_info = dtc_write_info, | 444 | .write_info = dtc_write_info, |
445 | .info = dtc_info, | 445 | .info = dtc_info, |
446 | .queuecommand = dtc_queue_command, | 446 | .queuecommand = dtc_queue_command, |
447 | .eh_abort_handler = dtc_abort, | 447 | .eh_abort_handler = dtc_abort, |
448 | .eh_bus_reset_handler = dtc_bus_reset, | 448 | .eh_bus_reset_handler = dtc_bus_reset, |
449 | .bios_param = dtc_biosparam, | 449 | .bios_param = dtc_biosparam, |
450 | .can_queue = CAN_QUEUE, | 450 | .can_queue = 32, |
451 | .this_id = 7, | 451 | .this_id = 7, |
452 | .sg_tablesize = SG_ALL, | 452 | .sg_tablesize = SG_ALL, |
453 | .cmd_per_lun = CMD_PER_LUN, | 453 | .cmd_per_lun = 2, |
454 | .use_clustering = DISABLE_CLUSTERING, | 454 | .use_clustering = DISABLE_CLUSTERING, |
455 | }; | 455 | }; |
456 | #include "scsi_module.c" | 456 | #include "scsi_module.c" |
diff --git a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h index e6c09a9174ce..56732cba8aba 100644 --- a/drivers/scsi/dtc.h +++ b/drivers/scsi/dtc.h | |||
@@ -10,14 +10,6 @@ | |||
10 | #ifndef DTC3280_H | 10 | #ifndef DTC3280_H |
11 | #define DTC3280_H | 11 | #define DTC3280_H |
12 | 12 | ||
13 | #ifndef CMD_PER_LUN | ||
14 | #define CMD_PER_LUN 2 | ||
15 | #endif | ||
16 | |||
17 | #ifndef CAN_QUEUE | ||
18 | #define CAN_QUEUE 32 | ||
19 | #endif | ||
20 | |||
21 | #define NCR5380_implementation_fields \ | 13 | #define NCR5380_implementation_fields \ |
22 | void __iomem *base | 14 | void __iomem *base |
23 | 15 | ||
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 1e8f29f500d5..ea9d0de2fc85 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -305,7 +305,6 @@ static int __init generic_NCR5380_detect(struct scsi_host_template *tpnt) | |||
305 | } | 305 | } |
306 | } | 306 | } |
307 | #endif | 307 | #endif |
308 | tpnt->proc_name = "g_NCR5380"; | ||
309 | 308 | ||
310 | for (count = 0; current_override < NO_OVERRIDES; ++current_override) { | 309 | for (count = 0; current_override < NO_OVERRIDES; ++current_override) { |
311 | if (!(overrides[current_override].NCR5380_map_name)) | 310 | if (!(overrides[current_override].NCR5380_map_name)) |
@@ -715,20 +714,21 @@ static int generic_NCR5380_dma_xfer_len(struct scsi_cmnd *cmd) | |||
715 | #include "NCR5380.c" | 714 | #include "NCR5380.c" |
716 | 715 | ||
717 | static struct scsi_host_template driver_template = { | 716 | static struct scsi_host_template driver_template = { |
718 | .show_info = generic_NCR5380_show_info, | 717 | .proc_name = DRV_MODULE_NAME, |
719 | .name = "Generic NCR5380/NCR53C400 SCSI", | 718 | .show_info = generic_NCR5380_show_info, |
720 | .detect = generic_NCR5380_detect, | 719 | .name = "Generic NCR5380/NCR53C400 SCSI", |
721 | .release = generic_NCR5380_release_resources, | 720 | .detect = generic_NCR5380_detect, |
722 | .info = generic_NCR5380_info, | 721 | .release = generic_NCR5380_release_resources, |
723 | .queuecommand = generic_NCR5380_queue_command, | 722 | .info = generic_NCR5380_info, |
723 | .queuecommand = generic_NCR5380_queue_command, | ||
724 | .eh_abort_handler = generic_NCR5380_abort, | 724 | .eh_abort_handler = generic_NCR5380_abort, |
725 | .eh_bus_reset_handler = generic_NCR5380_bus_reset, | 725 | .eh_bus_reset_handler = generic_NCR5380_bus_reset, |
726 | .bios_param = NCR5380_BIOSPARAM, | 726 | .bios_param = NCR5380_BIOSPARAM, |
727 | .can_queue = CAN_QUEUE, | 727 | .can_queue = 16, |
728 | .this_id = 7, | 728 | .this_id = 7, |
729 | .sg_tablesize = SG_ALL, | 729 | .sg_tablesize = SG_ALL, |
730 | .cmd_per_lun = CMD_PER_LUN, | 730 | .cmd_per_lun = 2, |
731 | .use_clustering = DISABLE_CLUSTERING, | 731 | .use_clustering = DISABLE_CLUSTERING, |
732 | }; | 732 | }; |
733 | 733 | ||
734 | #include "scsi_module.c" | 734 | #include "scsi_module.c" |
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h index 0056790a9cbe..fd201e94f66b 100644 --- a/drivers/scsi/g_NCR5380.h +++ b/drivers/scsi/g_NCR5380.h | |||
@@ -21,18 +21,11 @@ | |||
21 | #define NCR5380_BIOSPARAM NULL | 21 | #define NCR5380_BIOSPARAM NULL |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifndef CMD_PER_LUN | ||
25 | #define CMD_PER_LUN 2 | ||
26 | #endif | ||
27 | |||
28 | #ifndef CAN_QUEUE | ||
29 | #define CAN_QUEUE 16 | ||
30 | #endif | ||
31 | |||
32 | #define __STRVAL(x) #x | 24 | #define __STRVAL(x) #x |
33 | #define STRVAL(x) __STRVAL(x) | 25 | #define STRVAL(x) __STRVAL(x) |
34 | 26 | ||
35 | #ifndef SCSI_G_NCR5380_MEM | 27 | #ifndef SCSI_G_NCR5380_MEM |
28 | #define DRV_MODULE_NAME "g_NCR5380" | ||
36 | 29 | ||
37 | #define NCR5380_map_type int | 30 | #define NCR5380_map_type int |
38 | #define NCR5380_map_name port | 31 | #define NCR5380_map_name port |
@@ -53,6 +46,7 @@ | |||
53 | 46 | ||
54 | #else | 47 | #else |
55 | /* therefore SCSI_G_NCR5380_MEM */ | 48 | /* therefore SCSI_G_NCR5380_MEM */ |
49 | #define DRV_MODULE_NAME "g_NCR5380_mmio" | ||
56 | 50 | ||
57 | #define NCR5380_map_type unsigned long | 51 | #define NCR5380_map_type unsigned long |
58 | #define NCR5380_map_name base | 52 | #define NCR5380_map_name base |
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 420c2e204c13..e75bed25dd15 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
@@ -309,20 +309,20 @@ static int macscsi_pwrite(struct Scsi_Host *instance, | |||
309 | #define PFX DRV_MODULE_NAME ": " | 309 | #define PFX DRV_MODULE_NAME ": " |
310 | 310 | ||
311 | static struct scsi_host_template mac_scsi_template = { | 311 | static struct scsi_host_template mac_scsi_template = { |
312 | .module = THIS_MODULE, | 312 | .module = THIS_MODULE, |
313 | .proc_name = DRV_MODULE_NAME, | 313 | .proc_name = DRV_MODULE_NAME, |
314 | .show_info = macscsi_show_info, | 314 | .show_info = macscsi_show_info, |
315 | .write_info = macscsi_write_info, | 315 | .write_info = macscsi_write_info, |
316 | .name = "Macintosh NCR5380 SCSI", | 316 | .name = "Macintosh NCR5380 SCSI", |
317 | .info = macscsi_info, | 317 | .info = macscsi_info, |
318 | .queuecommand = macscsi_queue_command, | 318 | .queuecommand = macscsi_queue_command, |
319 | .eh_abort_handler = macscsi_abort, | 319 | .eh_abort_handler = macscsi_abort, |
320 | .eh_bus_reset_handler = macscsi_bus_reset, | 320 | .eh_bus_reset_handler = macscsi_bus_reset, |
321 | .can_queue = 16, | 321 | .can_queue = 16, |
322 | .this_id = 7, | 322 | .this_id = 7, |
323 | .sg_tablesize = SG_ALL, | 323 | .sg_tablesize = SG_ALL, |
324 | .cmd_per_lun = 2, | 324 | .cmd_per_lun = 2, |
325 | .use_clustering = DISABLE_CLUSTERING | 325 | .use_clustering = DISABLE_CLUSTERING, |
326 | }; | 326 | }; |
327 | 327 | ||
328 | static int __init mac_scsi_probe(struct platform_device *pdev) | 328 | static int __init mac_scsi_probe(struct platform_device *pdev) |
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 6a5896dade20..5f8a8295a5c1 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c | |||
@@ -546,22 +546,22 @@ static int pas16_release(struct Scsi_Host *shost) | |||
546 | } | 546 | } |
547 | 547 | ||
548 | static struct scsi_host_template driver_template = { | 548 | static struct scsi_host_template driver_template = { |
549 | .name = "Pro Audio Spectrum-16 SCSI", | 549 | .name = "Pro Audio Spectrum-16 SCSI", |
550 | .detect = pas16_detect, | 550 | .detect = pas16_detect, |
551 | .release = pas16_release, | 551 | .release = pas16_release, |
552 | .proc_name = "pas16", | 552 | .proc_name = "pas16", |
553 | .show_info = pas16_show_info, | 553 | .show_info = pas16_show_info, |
554 | .write_info = pas16_write_info, | 554 | .write_info = pas16_write_info, |
555 | .info = pas16_info, | 555 | .info = pas16_info, |
556 | .queuecommand = pas16_queue_command, | 556 | .queuecommand = pas16_queue_command, |
557 | .eh_abort_handler = pas16_abort, | 557 | .eh_abort_handler = pas16_abort, |
558 | .eh_bus_reset_handler = pas16_bus_reset, | 558 | .eh_bus_reset_handler = pas16_bus_reset, |
559 | .bios_param = pas16_biosparam, | 559 | .bios_param = pas16_biosparam, |
560 | .can_queue = CAN_QUEUE, | 560 | .can_queue = 32, |
561 | .this_id = 7, | 561 | .this_id = 7, |
562 | .sg_tablesize = SG_ALL, | 562 | .sg_tablesize = SG_ALL, |
563 | .cmd_per_lun = CMD_PER_LUN, | 563 | .cmd_per_lun = 2, |
564 | .use_clustering = DISABLE_CLUSTERING, | 564 | .use_clustering = DISABLE_CLUSTERING, |
565 | }; | 565 | }; |
566 | #include "scsi_module.c" | 566 | #include "scsi_module.c" |
567 | 567 | ||
diff --git a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h index a827a7c1c133..d37527717225 100644 --- a/drivers/scsi/pas16.h +++ b/drivers/scsi/pas16.h | |||
@@ -95,14 +95,6 @@ | |||
95 | #define OPERATION_MODE_1 0xec03 | 95 | #define OPERATION_MODE_1 0xec03 |
96 | #define IO_CONFIG_3 0xf002 | 96 | #define IO_CONFIG_3 0xf002 |
97 | 97 | ||
98 | #ifndef CMD_PER_LUN | ||
99 | #define CMD_PER_LUN 2 | ||
100 | #endif | ||
101 | |||
102 | #ifndef CAN_QUEUE | ||
103 | #define CAN_QUEUE 32 | ||
104 | #endif | ||
105 | |||
106 | #define NCR5380_implementation_fields /* none */ | 98 | #define NCR5380_implementation_fields /* none */ |
107 | 99 | ||
108 | #define PAS16_io_port(reg) (instance->io_port + pas16_offset[(reg)]) | 100 | #define PAS16_io_port(reg) (instance->io_port + pas16_offset[(reg)]) |
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c index c4fcf2fa74fc..082c91a4c1c4 100644 --- a/drivers/scsi/sun3_scsi.c +++ b/drivers/scsi/sun3_scsi.c | |||
@@ -463,13 +463,13 @@ static struct scsi_host_template sun3_scsi_template = { | |||
463 | .name = SUN3_SCSI_NAME, | 463 | .name = SUN3_SCSI_NAME, |
464 | .info = sun3scsi_info, | 464 | .info = sun3scsi_info, |
465 | .queuecommand = sun3scsi_queue_command, | 465 | .queuecommand = sun3scsi_queue_command, |
466 | .eh_abort_handler = sun3scsi_abort, | 466 | .eh_abort_handler = sun3scsi_abort, |
467 | .eh_bus_reset_handler = sun3scsi_bus_reset, | 467 | .eh_bus_reset_handler = sun3scsi_bus_reset, |
468 | .can_queue = 16, | 468 | .can_queue = 16, |
469 | .this_id = 7, | 469 | .this_id = 7, |
470 | .sg_tablesize = SG_NONE, | 470 | .sg_tablesize = SG_NONE, |
471 | .cmd_per_lun = 2, | 471 | .cmd_per_lun = 2, |
472 | .use_clustering = DISABLE_CLUSTERING | 472 | .use_clustering = DISABLE_CLUSTERING, |
473 | }; | 473 | }; |
474 | 474 | ||
475 | static int __init sun3_scsi_probe(struct platform_device *pdev) | 475 | static int __init sun3_scsi_probe(struct platform_device *pdev) |
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index 167c0750eba6..d1ed1f532a24 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c | |||
@@ -390,21 +390,21 @@ MODULE_LICENSE("GPL"); | |||
390 | #include "NCR5380.c" | 390 | #include "NCR5380.c" |
391 | 391 | ||
392 | static struct scsi_host_template driver_template = { | 392 | static struct scsi_host_template driver_template = { |
393 | .name = "Trantor T128/T128F/T228", | 393 | .name = "Trantor T128/T128F/T228", |
394 | .detect = t128_detect, | 394 | .detect = t128_detect, |
395 | .release = t128_release, | 395 | .release = t128_release, |
396 | .proc_name = "t128", | 396 | .proc_name = "t128", |
397 | .show_info = t128_show_info, | 397 | .show_info = t128_show_info, |
398 | .write_info = t128_write_info, | 398 | .write_info = t128_write_info, |
399 | .info = t128_info, | 399 | .info = t128_info, |
400 | .queuecommand = t128_queue_command, | 400 | .queuecommand = t128_queue_command, |
401 | .eh_abort_handler = t128_abort, | 401 | .eh_abort_handler = t128_abort, |
402 | .eh_bus_reset_handler = t128_bus_reset, | 402 | .eh_bus_reset_handler = t128_bus_reset, |
403 | .bios_param = t128_biosparam, | 403 | .bios_param = t128_biosparam, |
404 | .can_queue = CAN_QUEUE, | 404 | .can_queue = 32, |
405 | .this_id = 7, | 405 | .this_id = 7, |
406 | .sg_tablesize = SG_ALL, | 406 | .sg_tablesize = SG_ALL, |
407 | .cmd_per_lun = CMD_PER_LUN, | 407 | .cmd_per_lun = 2, |
408 | .use_clustering = DISABLE_CLUSTERING, | 408 | .use_clustering = DISABLE_CLUSTERING, |
409 | }; | 409 | }; |
410 | #include "scsi_module.c" | 410 | #include "scsi_module.c" |
diff --git a/drivers/scsi/t128.h b/drivers/scsi/t128.h index 16691d5fb81b..dd16d85497e1 100644 --- a/drivers/scsi/t128.h +++ b/drivers/scsi/t128.h | |||
@@ -67,14 +67,6 @@ | |||
67 | 67 | ||
68 | #define T_DATA_REG_OFFSET 0x1e00 /* rw 512 bytes long */ | 68 | #define T_DATA_REG_OFFSET 0x1e00 /* rw 512 bytes long */ |
69 | 69 | ||
70 | #ifndef CMD_PER_LUN | ||
71 | #define CMD_PER_LUN 2 | ||
72 | #endif | ||
73 | |||
74 | #ifndef CAN_QUEUE | ||
75 | #define CAN_QUEUE 32 | ||
76 | #endif | ||
77 | |||
78 | #define NCR5380_implementation_fields \ | 70 | #define NCR5380_implementation_fields \ |
79 | void __iomem *base | 71 | void __iomem *base |
80 | 72 | ||