diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2014-11-12 00:11:58 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:08 -0500 |
commit | 8c32513bd395dc5d382e4883097482567cf8bbc5 (patch) | |
tree | f603eda2bb0ccf602c88b69e7fb9f6fb6cb947c7 | |
parent | 270ac2c290ad8b83c92ceeed07aaf49ec5807851 (diff) |
ncr5380: Cleanup host info() methods
If the host->info() method is not set, then host->name is used by default.
For atari_scsi, that is exactly the same text. So remove the redundant
info() method. Keep sun3_scsi.c in line with atari_scsi.
Some NCR5380 drivers return an empty string from the info() method
(arm/cumana_1.c arm/oak.c mac_scsi.c) while other drivers use the default
(dmx3191d dtc.c g_NCR5380.c pas16.c t128.c).
Implement a common info() method to replace a lot of duplicated code which
the various drivers use to announce the same information.
This replaces most of the (deprecated) show_info() output and all of the
NCR5380_print_info() output. This also eliminates a bunch of code in
g_NCR5380 which just duplicates functionality in the core driver.
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/NCR5380.c | 74 | ||||
-rw-r--r-- | drivers/scsi/NCR5380.h | 3 | ||||
-rw-r--r-- | drivers/scsi/arm/cumana_1.c | 14 | ||||
-rw-r--r-- | drivers/scsi/arm/oak.c | 14 | ||||
-rw-r--r-- | drivers/scsi/atari_NCR5380.c | 57 | ||||
-rw-r--r-- | drivers/scsi/atari_scsi.c | 24 | ||||
-rw-r--r-- | drivers/scsi/atari_scsi.h | 1 | ||||
-rw-r--r-- | drivers/scsi/dmx3191d.c | 1 | ||||
-rw-r--r-- | drivers/scsi/dtc.c | 10 | ||||
-rw-r--r-- | drivers/scsi/dtc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.c | 135 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.h | 2 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.c | 14 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.h | 1 | ||||
-rw-r--r-- | drivers/scsi/pas16.c | 12 | ||||
-rw-r--r-- | drivers/scsi/pas16.h | 1 | ||||
-rw-r--r-- | drivers/scsi/sun3_NCR5380.c | 59 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.c | 18 | ||||
-rw-r--r-- | drivers/scsi/sun3_scsi.h | 1 | ||||
-rw-r--r-- | drivers/scsi/t128.c | 11 | ||||
-rw-r--r-- | drivers/scsi/t128.h | 1 |
21 files changed, 134 insertions, 320 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 2bb4df0e5551..f1792bb80e70 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -610,47 +610,70 @@ static int __init __maybe_unused NCR5380_probe_irq(struct Scsi_Host *instance, | |||
610 | } | 610 | } |
611 | 611 | ||
612 | /** | 612 | /** |
613 | * NCR58380_print_options - show options | 613 | * NCR58380_info - report driver and host information |
614 | * @instance: unused for now | 614 | * @instance: relevant scsi host instance |
615 | * | 615 | * |
616 | * Called by probe code indicating the NCR5380 driver options that | 616 | * For use as the host template info() handler. |
617 | * were selected. At some point this will switch to runtime options | ||
618 | * read from the adapter in question | ||
619 | * | 617 | * |
620 | * Locks: none | 618 | * Locks: none |
621 | */ | 619 | */ |
622 | 620 | ||
623 | static void __init __maybe_unused | 621 | static const char *NCR5380_info(struct Scsi_Host *instance) |
624 | NCR5380_print_options(struct Scsi_Host *instance) | ||
625 | { | 622 | { |
626 | printk(" generic options" | 623 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
624 | |||
625 | return hostdata->info; | ||
626 | } | ||
627 | |||
628 | static void prepare_info(struct Scsi_Host *instance) | ||
629 | { | ||
630 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | ||
631 | |||
632 | snprintf(hostdata->info, sizeof(hostdata->info), | ||
633 | "%s, io_port 0x%lx, n_io_port %d, " | ||
634 | "base 0x%lx, irq %d, " | ||
635 | "can_queue %d, cmd_per_lun %d, " | ||
636 | "sg_tablesize %d, this_id %d, " | ||
637 | "flags { %s%s%s}, " | ||
638 | #if defined(USLEEP_POLL) && defined(USLEEP_WAITLONG) | ||
639 | "USLEEP_POLL %d, USLEEP_WAITLONG %d, " | ||
640 | #endif | ||
641 | "options { %s} ", | ||
642 | instance->hostt->name, instance->io_port, instance->n_io_port, | ||
643 | instance->base, instance->irq, | ||
644 | instance->can_queue, instance->cmd_per_lun, | ||
645 | instance->sg_tablesize, instance->this_id, | ||
646 | hostdata->flags & FLAG_NCR53C400 ? "NCR53C400 " : "", | ||
647 | hostdata->flags & FLAG_DTC3181E ? "DTC3181E " : "", | ||
648 | hostdata->flags & FLAG_NO_PSEUDO_DMA ? "NO_PSEUDO_DMA " : "", | ||
649 | #if defined(USLEEP_POLL) && defined(USLEEP_WAITLONG) | ||
650 | USLEEP_POLL, USLEEP_WAITLONG, | ||
651 | #endif | ||
627 | #ifdef AUTOPROBE_IRQ | 652 | #ifdef AUTOPROBE_IRQ |
628 | " AUTOPROBE_IRQ" | 653 | "AUTOPROBE_IRQ " |
629 | #endif | 654 | #endif |
630 | #ifdef DIFFERENTIAL | 655 | #ifdef DIFFERENTIAL |
631 | " DIFFERENTIAL" | 656 | "DIFFERENTIAL " |
632 | #endif | 657 | #endif |
633 | #ifdef REAL_DMA | 658 | #ifdef REAL_DMA |
634 | " REAL DMA" | 659 | "REAL_DMA " |
635 | #endif | 660 | #endif |
636 | #ifdef REAL_DMA_POLL | 661 | #ifdef REAL_DMA_POLL |
637 | " REAL DMA POLL" | 662 | "REAL_DMA_POLL " |
638 | #endif | 663 | #endif |
639 | #ifdef PARITY | 664 | #ifdef PARITY |
640 | " PARITY" | 665 | "PARITY " |
641 | #endif | 666 | #endif |
642 | #ifdef PSEUDO_DMA | 667 | #ifdef PSEUDO_DMA |
643 | " PSEUDO DMA" | 668 | "PSEUDO_DMA " |
644 | #endif | 669 | #endif |
645 | #ifdef UNSAFE | 670 | #ifdef UNSAFE |
646 | " UNSAFE " | 671 | "UNSAFE " |
647 | #endif | 672 | #endif |
648 | ); | 673 | #ifdef NCR53C400 |
649 | printk(" USLEEP_POLL=%d USLEEP_SLEEP=%d", USLEEP_POLL, USLEEP_SLEEP); | 674 | "NCR53C400 " |
650 | printk(" generic release=%d", NCR5380_PUBLIC_RELEASE); | 675 | #endif |
651 | if (((struct NCR5380_hostdata *) instance->hostdata)->flags & FLAG_NCR53C400) { | 676 | ""); |
652 | printk(" ncr53c400 release=%d", NCR53C400_PUBLIC_RELEASE); | ||
653 | } | ||
654 | } | 677 | } |
655 | 678 | ||
656 | /** | 679 | /** |
@@ -728,13 +751,6 @@ static int __maybe_unused NCR5380_show_info(struct seq_file *m, | |||
728 | SPRINTF("PAS16 release=%d", PAS16_PUBLIC_RELEASE); | 751 | SPRINTF("PAS16 release=%d", PAS16_PUBLIC_RELEASE); |
729 | #endif | 752 | #endif |
730 | 753 | ||
731 | SPRINTF("\nBase Addr: 0x%05lX ", (long) instance->base); | ||
732 | SPRINTF("io_port: %04x ", (int) instance->io_port); | ||
733 | if (instance->irq == NO_IRQ) | ||
734 | SPRINTF("IRQ: None.\n"); | ||
735 | else | ||
736 | SPRINTF("IRQ: %d.\n", instance->irq); | ||
737 | |||
738 | #ifdef DTC_PUBLIC_RELEASE | 754 | #ifdef DTC_PUBLIC_RELEASE |
739 | SPRINTF("Highwater I/O busy_spin_counts -- write: %d read: %d\n", dtc_wmaxi, dtc_maxi); | 755 | SPRINTF("Highwater I/O busy_spin_counts -- write: %d read: %d\n", dtc_wmaxi, dtc_maxi); |
740 | #endif | 756 | #endif |
@@ -842,6 +858,8 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags) | |||
842 | hostdata->host = instance; | 858 | hostdata->host = instance; |
843 | hostdata->time_expires = 0; | 859 | hostdata->time_expires = 0; |
844 | 860 | ||
861 | prepare_info(instance); | ||
862 | |||
845 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); | 863 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); |
846 | NCR5380_write(MODE_REG, MR_BASE); | 864 | NCR5380_write(MODE_REG, MR_BASE); |
847 | NCR5380_write(TARGET_COMMAND_REG, 0); | 865 | NCR5380_write(TARGET_COMMAND_REG, 0); |
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h index d811775ffd9d..dc37da49656b 100644 --- a/drivers/scsi/NCR5380.h +++ b/drivers/scsi/NCR5380.h | |||
@@ -273,6 +273,7 @@ struct NCR5380_hostdata { | |||
273 | volatile Scsi_Cmnd *selecting; | 273 | volatile Scsi_Cmnd *selecting; |
274 | struct delayed_work coroutine; /* our co-routine */ | 274 | struct delayed_work coroutine; /* our co-routine */ |
275 | struct scsi_eh_save ses; | 275 | struct scsi_eh_save ses; |
276 | char info[256]; | ||
276 | }; | 277 | }; |
277 | 278 | ||
278 | #ifdef __KERNEL__ | 279 | #ifdef __KERNEL__ |
@@ -307,7 +308,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance); | |||
307 | static irqreturn_t NCR5380_intr(int irq, void *dev_id); | 308 | static irqreturn_t NCR5380_intr(int irq, void *dev_id); |
308 | #endif | 309 | #endif |
309 | static void NCR5380_main(struct work_struct *work); | 310 | static void NCR5380_main(struct work_struct *work); |
310 | static void __maybe_unused NCR5380_print_options(struct Scsi_Host *instance); | 311 | static const char *NCR5380_info(struct Scsi_Host *instance); |
311 | static void NCR5380_reselect(struct Scsi_Host *instance); | 312 | static void NCR5380_reselect(struct Scsi_Host *instance); |
312 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd); | 313 | static int NCR5380_select(struct Scsi_Host *instance, Scsi_Cmnd *cmd); |
313 | #if defined(PSEUDO_DMA) || defined(REAL_DMA) || defined(REAL_DMA_POLL) | 314 | #if defined(PSEUDO_DMA) || defined(REAL_DMA) || defined(REAL_DMA_POLL) |
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index 8266039b60ee..d3b96af3aa5c 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #define NCR5380_write(reg, value) cumanascsi_write(_instance, reg, value) | 29 | #define NCR5380_write(reg, value) cumanascsi_write(_instance, reg, value) |
30 | #define NCR5380_intr cumanascsi_intr | 30 | #define NCR5380_intr cumanascsi_intr |
31 | #define NCR5380_queue_command cumanascsi_queue_command | 31 | #define NCR5380_queue_command cumanascsi_queue_command |
32 | #define NCR5380_info cumanascsi_info | ||
32 | 33 | ||
33 | #define NCR5380_implementation_fields \ | 34 | #define NCR5380_implementation_fields \ |
34 | unsigned ctrl; \ | 35 | unsigned ctrl; \ |
@@ -41,11 +42,6 @@ void cumanascsi_setup(char *str, int *ints) | |||
41 | { | 42 | { |
42 | } | 43 | } |
43 | 44 | ||
44 | const char *cumanascsi_info(struct Scsi_Host *spnt) | ||
45 | { | ||
46 | return ""; | ||
47 | } | ||
48 | |||
49 | #define CTRL 0x16fc | 45 | #define CTRL 0x16fc |
50 | #define STAT 0x2004 | 46 | #define STAT 0x2004 |
51 | #define L(v) (((v)<<16)|((v) & 0x0000ffff)) | 47 | #define L(v) (((v)<<16)|((v) & 0x0000ffff)) |
@@ -266,14 +262,6 @@ static int cumanascsi1_probe(struct expansion_card *ec, | |||
266 | goto out_unmap; | 262 | goto out_unmap; |
267 | } | 263 | } |
268 | 264 | ||
269 | printk("scsi%d: at port 0x%08lx irq %d", | ||
270 | host->host_no, host->io_port, host->irq); | ||
271 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", | ||
272 | host->can_queue, host->cmd_per_lun, CUMANASCSI_PUBLIC_RELEASE); | ||
273 | printk("\nscsi%d:", host->host_no); | ||
274 | NCR5380_print_options(host); | ||
275 | printk("\n"); | ||
276 | |||
277 | ret = scsi_add_host(host, &ec->dev); | 265 | ret = scsi_add_host(host, &ec->dev); |
278 | if (ret) | 266 | if (ret) |
279 | goto out_free_irq; | 267 | goto out_free_irq; |
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c index 13d5995531fc..a5ef3f79a2fd 100644 --- a/drivers/scsi/arm/oak.c +++ b/drivers/scsi/arm/oak.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #define NCR5380_read(reg) readb(_base + ((reg) << 2)) | 29 | #define NCR5380_read(reg) readb(_base + ((reg) << 2)) |
30 | #define NCR5380_write(reg, value) writeb(value, _base + ((reg) << 2)) | 30 | #define NCR5380_write(reg, value) writeb(value, _base + ((reg) << 2)) |
31 | #define NCR5380_queue_command oakscsi_queue_command | 31 | #define NCR5380_queue_command oakscsi_queue_command |
32 | #define NCR5380_info oakscsi_info | ||
32 | #define NCR5380_show_info oakscsi_show_info | 33 | #define NCR5380_show_info oakscsi_show_info |
33 | #define NCR5380_write_info oakscsi_write_info | 34 | #define NCR5380_write_info oakscsi_write_info |
34 | 35 | ||
@@ -40,11 +41,6 @@ | |||
40 | #undef START_DMA_INITIATOR_RECEIVE_REG | 41 | #undef START_DMA_INITIATOR_RECEIVE_REG |
41 | #define START_DMA_INITIATOR_RECEIVE_REG (128 + 7) | 42 | #define START_DMA_INITIATOR_RECEIVE_REG (128 + 7) |
42 | 43 | ||
43 | const char * oakscsi_info (struct Scsi_Host *spnt) | ||
44 | { | ||
45 | return ""; | ||
46 | } | ||
47 | |||
48 | #define STAT ((128 + 16) << 2) | 44 | #define STAT ((128 + 16) << 2) |
49 | #define DATA ((128 + 8) << 2) | 45 | #define DATA ((128 + 8) << 2) |
50 | 46 | ||
@@ -153,14 +149,6 @@ static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
153 | 149 | ||
154 | NCR5380_init(host, 0); | 150 | NCR5380_init(host, 0); |
155 | 151 | ||
156 | printk("scsi%d: at port 0x%08lx irqs disabled", | ||
157 | host->host_no, host->io_port); | ||
158 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", | ||
159 | host->can_queue, host->cmd_per_lun, OAKSCSI_PUBLIC_RELEASE); | ||
160 | printk("\nscsi%d:", host->host_no); | ||
161 | NCR5380_print_options(host); | ||
162 | printk("\n"); | ||
163 | |||
164 | ret = scsi_add_host(host, &ec->dev); | 152 | ret = scsi_add_host(host, &ec->dev); |
165 | if (ret) | 153 | if (ret) |
166 | goto out_unmap; | 154 | goto out_unmap; |
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c index 6177830ef0d9..4d903b86adda 100644 --- a/drivers/scsi/atari_NCR5380.c +++ b/drivers/scsi/atari_NCR5380.c | |||
@@ -144,12 +144,6 @@ | |||
144 | * be able to coexist with appropriate changes to the high level | 144 | * be able to coexist with appropriate changes to the high level |
145 | * SCSI code. | 145 | * SCSI code. |
146 | * | 146 | * |
147 | * A NCR5380_PUBLIC_REVISION macro is provided, with the release | ||
148 | * number (updated for each public release) printed by the | ||
149 | * NCR5380_print_options command, which should be called from the | ||
150 | * wrapper detect function, so that I know what release of the driver | ||
151 | * users are using. | ||
152 | * | ||
153 | * Issues specific to the NCR5380 : | 147 | * Issues specific to the NCR5380 : |
154 | * | 148 | * |
155 | * When used in a PIO or pseudo-dma mode, the NCR5380 is a braindead | 149 | * When used in a PIO or pseudo-dma mode, the NCR5380 is a braindead |
@@ -247,7 +241,6 @@ | |||
247 | * NCR5380_queue_command | 241 | * NCR5380_queue_command |
248 | * NCR5380_reset | 242 | * NCR5380_reset |
249 | * NCR5380_abort | 243 | * NCR5380_abort |
250 | * NCR5380_proc_info | ||
251 | * | 244 | * |
252 | * to be the global entry points into the specific driver, ie | 245 | * to be the global entry points into the specific driver, ie |
253 | * #define NCR5380_queue_command t128_queue_command. | 246 | * #define NCR5380_queue_command t128_queue_command. |
@@ -259,8 +252,7 @@ | |||
259 | * The generic driver is initialized by calling NCR5380_init(instance), | 252 | * The generic driver is initialized by calling NCR5380_init(instance), |
260 | * after setting the appropriate host specific fields and ID. If the | 253 | * after setting the appropriate host specific fields and ID. If the |
261 | * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance, | 254 | * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance, |
262 | * possible) function may be used. Before the specific driver initialization | 255 | * possible) function may be used. |
263 | * code finishes, NCR5380_print_options should be called. | ||
264 | */ | 256 | */ |
265 | 257 | ||
266 | static struct Scsi_Host *first_instance = NULL; | 258 | static struct Scsi_Host *first_instance = NULL; |
@@ -670,30 +662,49 @@ static inline void NCR5380_all_init(void) | |||
670 | } | 662 | } |
671 | } | 663 | } |
672 | 664 | ||
673 | 665 | /** | |
674 | /* | 666 | * NCR58380_info - report driver and host information |
675 | * Function : void NCR58380_print_options (struct Scsi_Host *instance) | 667 | * @instance: relevant scsi host instance |
676 | * | 668 | * |
677 | * Purpose : called by probe code indicating the NCR5380 driver | 669 | * For use as the host template info() handler. |
678 | * options that were selected. | ||
679 | * | 670 | * |
680 | * Inputs : instance, pointer to this instance. Unused. | 671 | * Locks: none |
681 | */ | 672 | */ |
682 | 673 | ||
683 | static void __init NCR5380_print_options(struct Scsi_Host *instance) | 674 | static const char *NCR5380_info(struct Scsi_Host *instance) |
684 | { | 675 | { |
685 | printk(" generic options" | 676 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
677 | |||
678 | return hostdata->info; | ||
679 | } | ||
680 | |||
681 | static void prepare_info(struct Scsi_Host *instance) | ||
682 | { | ||
683 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | ||
684 | |||
685 | snprintf(hostdata->info, sizeof(hostdata->info), | ||
686 | "%s, io_port 0x%lx, n_io_port %d, " | ||
687 | "base 0x%lx, irq %d, " | ||
688 | "can_queue %d, cmd_per_lun %d, " | ||
689 | "sg_tablesize %d, this_id %d, " | ||
690 | "options { %s} ", | ||
691 | instance->hostt->name, instance->io_port, instance->n_io_port, | ||
692 | instance->base, instance->irq, | ||
693 | instance->can_queue, instance->cmd_per_lun, | ||
694 | instance->sg_tablesize, instance->this_id, | ||
695 | #ifdef DIFFERENTIAL | ||
696 | "DIFFERENTIAL " | ||
697 | #endif | ||
686 | #ifdef REAL_DMA | 698 | #ifdef REAL_DMA |
687 | " REAL DMA" | 699 | "REAL_DMA " |
688 | #endif | 700 | #endif |
689 | #ifdef PARITY | 701 | #ifdef PARITY |
690 | " PARITY" | 702 | "PARITY " |
691 | #endif | 703 | #endif |
692 | #ifdef SUPPORT_TAGS | 704 | #ifdef SUPPORT_TAGS |
693 | " SCSI-2 TAGGED QUEUING" | 705 | "SUPPORT_TAGS " |
694 | #endif | 706 | #endif |
695 | ); | 707 | ""); |
696 | printk(" generic release=%d", NCR5380_PUBLIC_RELEASE); | ||
697 | } | 708 | } |
698 | 709 | ||
699 | /* | 710 | /* |
@@ -839,6 +850,8 @@ static int __init NCR5380_init(struct Scsi_Host *instance, int flags) | |||
839 | first_instance = instance; | 850 | first_instance = instance; |
840 | } | 851 | } |
841 | 852 | ||
853 | prepare_info(instance); | ||
854 | |||
842 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); | 855 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); |
843 | NCR5380_write(MODE_REG, MR_BASE); | 856 | NCR5380_write(MODE_REG, MR_BASE); |
844 | NCR5380_write(TARGET_COMMAND_REG, 0); | 857 | NCR5380_write(TARGET_COMMAND_REG, 0); |
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index 9f4d58ca3647..1022a391c82a 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -699,21 +699,6 @@ static int __init atari_scsi_detect(struct scsi_host_template *host) | |||
699 | #endif | 699 | #endif |
700 | } | 700 | } |
701 | 701 | ||
702 | printk(KERN_INFO "scsi%d: options CAN_QUEUE=%d CMD_PER_LUN=%d SCAT-GAT=%d " | ||
703 | #ifdef SUPPORT_TAGS | ||
704 | "TAGGED-QUEUING=%s " | ||
705 | #endif | ||
706 | "HOSTID=%d", | ||
707 | instance->host_no, instance->hostt->can_queue, | ||
708 | instance->hostt->cmd_per_lun, | ||
709 | instance->hostt->sg_tablesize, | ||
710 | #ifdef SUPPORT_TAGS | ||
711 | setup_use_tagged_queuing ? "yes" : "no", | ||
712 | #endif | ||
713 | instance->hostt->this_id ); | ||
714 | NCR5380_print_options(instance); | ||
715 | printk("\n"); | ||
716 | |||
717 | called = 1; | 702 | called = 1; |
718 | return 1; | 703 | return 1; |
719 | } | 704 | } |
@@ -815,15 +800,6 @@ static void __init atari_scsi_reset_boot(void) | |||
815 | } | 800 | } |
816 | #endif | 801 | #endif |
817 | 802 | ||
818 | |||
819 | static const char *atari_scsi_info(struct Scsi_Host *host) | ||
820 | { | ||
821 | /* atari_scsi_detect() is verbose enough... */ | ||
822 | static const char string[] = "Atari native SCSI"; | ||
823 | return string; | ||
824 | } | ||
825 | |||
826 | |||
827 | #if defined(REAL_DMA) | 803 | #if defined(REAL_DMA) |
828 | 804 | ||
829 | static unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance, | 805 | static unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance, |
diff --git a/drivers/scsi/atari_scsi.h b/drivers/scsi/atari_scsi.h index 58cc32f79b86..24e854590dc4 100644 --- a/drivers/scsi/atari_scsi.h +++ b/drivers/scsi/atari_scsi.h | |||
@@ -47,6 +47,7 @@ | |||
47 | #define NCR5380_queue_command atari_scsi_queue_command | 47 | #define NCR5380_queue_command atari_scsi_queue_command |
48 | #define NCR5380_abort atari_scsi_abort | 48 | #define NCR5380_abort atari_scsi_abort |
49 | #define NCR5380_show_info atari_scsi_show_info | 49 | #define NCR5380_show_info atari_scsi_show_info |
50 | #define NCR5380_info atari_scsi_info | ||
50 | #define NCR5380_dma_read_setup(inst,d,c) atari_scsi_dma_setup (inst, d, c, 0) | 51 | #define NCR5380_dma_read_setup(inst,d,c) atari_scsi_dma_setup (inst, d, c, 0) |
51 | #define NCR5380_dma_write_setup(inst,d,c) atari_scsi_dma_setup (inst, d, c, 1) | 52 | #define NCR5380_dma_write_setup(inst,d,c) atari_scsi_dma_setup (inst, d, c, 1) |
52 | #define NCR5380_dma_residual(inst) atari_scsi_dma_residual( inst ) | 53 | #define NCR5380_dma_residual(inst) atari_scsi_dma_residual( inst ) |
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 6e1960a88270..feaba705a369 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
@@ -57,6 +57,7 @@ | |||
57 | static struct scsi_host_template dmx3191d_driver_template = { | 57 | static struct scsi_host_template dmx3191d_driver_template = { |
58 | .proc_name = DMX3191D_DRIVER_NAME, | 58 | .proc_name = DMX3191D_DRIVER_NAME, |
59 | .name = "Domex DMX3191D", | 59 | .name = "Domex DMX3191D", |
60 | .info = NCR5380_info, | ||
60 | .queuecommand = NCR5380_queue_command, | 61 | .queuecommand = NCR5380_queue_command, |
61 | .eh_abort_handler = NCR5380_abort, | 62 | .eh_abort_handler = NCR5380_abort, |
62 | .eh_bus_reset_handler = NCR5380_bus_reset, | 63 | .eh_bus_reset_handler = NCR5380_bus_reset, |
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 2971c7f0e898..2dacf2833b64 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c | |||
@@ -281,15 +281,6 @@ found: | |||
281 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); | 281 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); |
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | printk(KERN_INFO "scsi%d : at 0x%05X", instance->host_no, (int) instance->base); | ||
285 | if (instance->irq == NO_IRQ) | ||
286 | printk(" interrupts disabled"); | ||
287 | else | ||
288 | printk(" irq %d", instance->irq); | ||
289 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", CAN_QUEUE, CMD_PER_LUN, DTC_PUBLIC_RELEASE); | ||
290 | NCR5380_print_options(instance); | ||
291 | printk("\n"); | ||
292 | |||
293 | ++current_override; | 284 | ++current_override; |
294 | ++count; | 285 | ++count; |
295 | } | 286 | } |
@@ -461,6 +452,7 @@ static struct scsi_host_template driver_template = { | |||
461 | .proc_name = "dtc3x80", | 452 | .proc_name = "dtc3x80", |
462 | .show_info = dtc_show_info, | 453 | .show_info = dtc_show_info, |
463 | .write_info = dtc_write_info, | 454 | .write_info = dtc_write_info, |
455 | .info = dtc_info, | ||
464 | .queuecommand = dtc_queue_command, | 456 | .queuecommand = dtc_queue_command, |
465 | .eh_abort_handler = dtc_abort, | 457 | .eh_abort_handler = dtc_abort, |
466 | .eh_bus_reset_handler = dtc_bus_reset, | 458 | .eh_bus_reset_handler = dtc_bus_reset, |
diff --git a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h index 46ad3403bda7..48e2c399ace6 100644 --- a/drivers/scsi/dtc.h +++ b/drivers/scsi/dtc.h | |||
@@ -65,6 +65,7 @@ | |||
65 | #define NCR5380_queue_command dtc_queue_command | 65 | #define NCR5380_queue_command dtc_queue_command |
66 | #define NCR5380_abort dtc_abort | 66 | #define NCR5380_abort dtc_abort |
67 | #define NCR5380_bus_reset dtc_bus_reset | 67 | #define NCR5380_bus_reset dtc_bus_reset |
68 | #define NCR5380_info dtc_info | ||
68 | #define NCR5380_show_info dtc_show_info | 69 | #define NCR5380_show_info dtc_show_info |
69 | #define NCR5380_write_info dtc_write_info | 70 | #define NCR5380_write_info dtc_write_info |
70 | 71 | ||
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 9040023ed1c0..2b8155f1bf94 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -446,15 +446,6 @@ static int __init generic_NCR5380_detect(struct scsi_host_template *tpnt) | |||
446 | printk(KERN_INFO "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); | 446 | printk(KERN_INFO "scsi%d : please jumper the board for a free IRQ.\n", instance->host_no); |
447 | } | 447 | } |
448 | 448 | ||
449 | printk(KERN_INFO "scsi%d : at " STRVAL(NCR5380_map_name) " 0x%x", instance->host_no, (unsigned int) instance->NCR5380_instance_name); | ||
450 | if (instance->irq == NO_IRQ) | ||
451 | printk(" interrupts disabled"); | ||
452 | else | ||
453 | printk(" irq %d", instance->irq); | ||
454 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", CAN_QUEUE, CMD_PER_LUN, GENERIC_NCR5380_PUBLIC_RELEASE); | ||
455 | NCR5380_print_options(instance); | ||
456 | printk("\n"); | ||
457 | |||
458 | ++current_override; | 449 | ++current_override; |
459 | ++count; | 450 | ++count; |
460 | } | 451 | } |
@@ -462,19 +453,6 @@ static int __init generic_NCR5380_detect(struct scsi_host_template *tpnt) | |||
462 | } | 453 | } |
463 | 454 | ||
464 | /** | 455 | /** |
465 | * generic_NCR5380_info - reporting string | ||
466 | * @host: NCR5380 to report on | ||
467 | * | ||
468 | * Report driver information for the NCR5380 | ||
469 | */ | ||
470 | |||
471 | static const char *generic_NCR5380_info(struct Scsi_Host *host) | ||
472 | { | ||
473 | static const char string[] = "Generic NCR5380/53C400 Driver"; | ||
474 | return string; | ||
475 | } | ||
476 | |||
477 | /** | ||
478 | * generic_NCR5380_release_resources - free resources | 456 | * generic_NCR5380_release_resources - free resources |
479 | * @instance: host adapter to clean up | 457 | * @instance: host adapter to clean up |
480 | * | 458 | * |
@@ -720,120 +698,9 @@ static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, | |||
720 | 698 | ||
721 | #include "NCR5380.c" | 699 | #include "NCR5380.c" |
722 | 700 | ||
723 | #define PRINTP(x) seq_printf(m, x) | ||
724 | #define ANDP , | ||
725 | |||
726 | static void sprint_opcode(struct seq_file *m, int opcode) | ||
727 | { | ||
728 | PRINTP("0x%02x " ANDP opcode); | ||
729 | } | ||
730 | |||
731 | static void sprint_command(struct seq_file *m, unsigned char *command) | ||
732 | { | ||
733 | int i, s; | ||
734 | sprint_opcode(m, command[0]); | ||
735 | for (i = 1, s = COMMAND_SIZE(command[0]); i < s; ++i) | ||
736 | PRINTP("%02x " ANDP command[i]); | ||
737 | PRINTP("\n"); | ||
738 | } | ||
739 | |||
740 | /** | ||
741 | * sprintf_Scsi_Cmnd - print a scsi command | ||
742 | * @m: seq_fil to print into | ||
743 | * @cmd: SCSI command block | ||
744 | * | ||
745 | * Print out the target and command data in hex | ||
746 | */ | ||
747 | |||
748 | static void sprint_Scsi_Cmnd(struct seq_file *m, Scsi_Cmnd * cmd) | ||
749 | { | ||
750 | PRINTP("host number %d destination target %d, lun %llu\n" ANDP cmd->device->host->host_no ANDP cmd->device->id ANDP cmd->device->lun); | ||
751 | PRINTP(" command = "); | ||
752 | sprint_command(m, cmd->cmnd); | ||
753 | } | ||
754 | |||
755 | /** | ||
756 | * generic_NCR5380_proc_info - /proc for NCR5380 driver | ||
757 | * @buffer: buffer to print into | ||
758 | * @start: start position | ||
759 | * @offset: offset into buffer | ||
760 | * @len: length | ||
761 | * @hostno: instance to affect | ||
762 | * @inout: read/write | ||
763 | * | ||
764 | * Provide the procfs information for the 5380 controller. We fill | ||
765 | * this with useful debugging information including the commands | ||
766 | * being executed, disconnected command queue and the statistical | ||
767 | * data | ||
768 | * | ||
769 | * Locks: global cli/lock for queue walk | ||
770 | */ | ||
771 | |||
772 | static int generic_NCR5380_show_info(struct seq_file *m, struct Scsi_Host *scsi_ptr) | ||
773 | { | ||
774 | NCR5380_local_declare(); | ||
775 | unsigned long flags; | ||
776 | unsigned char status; | ||
777 | int i; | ||
778 | Scsi_Cmnd *ptr; | ||
779 | struct NCR5380_hostdata *hostdata; | ||
780 | |||
781 | NCR5380_setup(scsi_ptr); | ||
782 | hostdata = (struct NCR5380_hostdata *) scsi_ptr->hostdata; | ||
783 | |||
784 | spin_lock_irqsave(scsi_ptr->host_lock, flags); | ||
785 | PRINTP("SCSI host number %d : %s\n" ANDP scsi_ptr->host_no ANDP scsi_ptr->hostt->name); | ||
786 | PRINTP("Generic NCR5380 driver version %d\n" ANDP GENERIC_NCR5380_PUBLIC_RELEASE); | ||
787 | PRINTP("NCR5380 core version %d\n" ANDP NCR5380_PUBLIC_RELEASE); | ||
788 | #ifdef NCR53C400 | ||
789 | PRINTP("NCR53C400 extension version %d\n" ANDP NCR53C400_PUBLIC_RELEASE); | ||
790 | PRINTP("NCR53C400 card%s detected\n" ANDP(((struct NCR5380_hostdata *) scsi_ptr->hostdata)->flags & FLAG_NCR53C400) ? "" : " not"); | ||
791 | # if NCR53C400_PSEUDO_DMA | ||
792 | PRINTP("NCR53C400 pseudo DMA used\n"); | ||
793 | # endif | ||
794 | #else | ||
795 | PRINTP("NO NCR53C400 driver extensions\n"); | ||
796 | #endif | ||
797 | PRINTP("Using %s mapping at %s 0x%lx, " ANDP STRVAL(NCR5380_map_config) ANDP STRVAL(NCR5380_map_name) ANDP scsi_ptr->NCR5380_instance_name); | ||
798 | if (scsi_ptr->irq == NO_IRQ) | ||
799 | PRINTP("no interrupt\n"); | ||
800 | else | ||
801 | PRINTP("on interrupt %d\n" ANDP scsi_ptr->irq); | ||
802 | |||
803 | status = NCR5380_read(STATUS_REG); | ||
804 | if (!(status & SR_REQ)) | ||
805 | PRINTP("REQ not asserted, phase unknown.\n"); | ||
806 | else { | ||
807 | for (i = 0; (phases[i].value != PHASE_UNKNOWN) && (phases[i].value != (status & PHASE_MASK)); ++i); | ||
808 | PRINTP("Phase %s\n" ANDP phases[i].name); | ||
809 | } | ||
810 | |||
811 | if (!hostdata->connected) { | ||
812 | PRINTP("No currently connected command\n"); | ||
813 | } else { | ||
814 | sprint_Scsi_Cmnd(m, (Scsi_Cmnd *) hostdata->connected); | ||
815 | } | ||
816 | |||
817 | PRINTP("issue_queue\n"); | ||
818 | |||
819 | for (ptr = (Scsi_Cmnd *) hostdata->issue_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble) | ||
820 | sprint_Scsi_Cmnd(m, ptr); | ||
821 | |||
822 | PRINTP("disconnected_queue\n"); | ||
823 | |||
824 | for (ptr = (Scsi_Cmnd *) hostdata->disconnected_queue; ptr; ptr = (Scsi_Cmnd *) ptr->host_scribble) | ||
825 | sprint_Scsi_Cmnd(m, ptr); | ||
826 | |||
827 | spin_unlock_irqrestore(scsi_ptr->host_lock, flags); | ||
828 | return 0; | ||
829 | } | ||
830 | |||
831 | #undef PRINTP | ||
832 | #undef ANDP | ||
833 | |||
834 | static struct scsi_host_template driver_template = { | 701 | static struct scsi_host_template driver_template = { |
835 | .show_info = generic_NCR5380_show_info, | 702 | .show_info = generic_NCR5380_show_info, |
836 | .name = "Generic NCR5380/NCR53C400 Scsi Driver", | 703 | .name = "Generic NCR5380/NCR53C400 SCSI", |
837 | .detect = generic_NCR5380_detect, | 704 | .detect = generic_NCR5380_detect, |
838 | .release = generic_NCR5380_release_resources, | 705 | .release = generic_NCR5380_release_resources, |
839 | .info = generic_NCR5380_info, | 706 | .info = generic_NCR5380_info, |
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h index e15b95c37860..b1c7ae1204d8 100644 --- a/drivers/scsi/g_NCR5380.h +++ b/drivers/scsi/g_NCR5380.h | |||
@@ -100,6 +100,8 @@ | |||
100 | #define NCR5380_bus_reset generic_NCR5380_bus_reset | 100 | #define NCR5380_bus_reset generic_NCR5380_bus_reset |
101 | #define NCR5380_pread generic_NCR5380_pread | 101 | #define NCR5380_pread generic_NCR5380_pread |
102 | #define NCR5380_pwrite generic_NCR5380_pwrite | 102 | #define NCR5380_pwrite generic_NCR5380_pwrite |
103 | #define NCR5380_info generic_NCR5380_info | ||
104 | #define NCR5380_show_info generic_NCR5380_show_info | ||
103 | 105 | ||
104 | #define BOARD_NCR5380 0 | 106 | #define BOARD_NCR5380 0 |
105 | #define BOARD_NCR53C400 1 | 107 | #define BOARD_NCR53C400 1 |
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 5d8d75c619cd..a27216d534ed 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
@@ -236,16 +236,6 @@ int __init macscsi_detect(struct scsi_host_template * tpnt) | |||
236 | instance->irq = NO_IRQ; | 236 | instance->irq = NO_IRQ; |
237 | } | 237 | } |
238 | 238 | ||
239 | printk(KERN_INFO "scsi%d: generic 5380 at port %lX irq", instance->host_no, instance->io_port); | ||
240 | if (instance->irq == NO_IRQ) | ||
241 | printk (KERN_INFO "s disabled"); | ||
242 | else | ||
243 | printk (KERN_INFO " %d", instance->irq); | ||
244 | printk(KERN_INFO " options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", | ||
245 | instance->can_queue, instance->cmd_per_lun, MACSCSI_PUBLIC_RELEASE); | ||
246 | printk(KERN_INFO "\nscsi%d:", instance->host_no); | ||
247 | NCR5380_print_options(instance); | ||
248 | printk("\n"); | ||
249 | called = 1; | 239 | called = 1; |
250 | return 1; | 240 | return 1; |
251 | } | 241 | } |
@@ -297,10 +287,6 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance) | |||
297 | } | 287 | } |
298 | #endif | 288 | #endif |
299 | 289 | ||
300 | const char * macscsi_info (struct Scsi_Host *spnt) { | ||
301 | return ""; | ||
302 | } | ||
303 | |||
304 | /* | 290 | /* |
305 | Pseudo-DMA: (Ove Edlund) | 291 | Pseudo-DMA: (Ove Edlund) |
306 | The code attempts to catch bus errors that occur if one for example | 292 | The code attempts to catch bus errors that occur if one for example |
diff --git a/drivers/scsi/mac_scsi.h b/drivers/scsi/mac_scsi.h index 0b123fe9c248..66b34dbdc0d0 100644 --- a/drivers/scsi/mac_scsi.h +++ b/drivers/scsi/mac_scsi.h | |||
@@ -53,6 +53,7 @@ | |||
53 | #define NCR5380_queue_command macscsi_queue_command | 53 | #define NCR5380_queue_command macscsi_queue_command |
54 | #define NCR5380_abort macscsi_abort | 54 | #define NCR5380_abort macscsi_abort |
55 | #define NCR5380_bus_reset macscsi_bus_reset | 55 | #define NCR5380_bus_reset macscsi_bus_reset |
56 | #define NCR5380_info macscsi_info | ||
56 | #define NCR5380_show_info macscsi_show_info | 57 | #define NCR5380_show_info macscsi_show_info |
57 | #define NCR5380_write_info macscsi_write_info | 58 | #define NCR5380_write_info macscsi_write_info |
58 | 59 | ||
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 3782091f82cb..51766895e90e 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c | |||
@@ -438,17 +438,6 @@ static int __init pas16_detect(struct scsi_host_template *tpnt) | |||
438 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); | 438 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); |
439 | #endif | 439 | #endif |
440 | 440 | ||
441 | printk("scsi%d : at 0x%04x", instance->host_no, (int) | ||
442 | instance->io_port); | ||
443 | if (instance->irq == NO_IRQ) | ||
444 | printk (" interrupts disabled"); | ||
445 | else | ||
446 | printk (" irq %d", instance->irq); | ||
447 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", | ||
448 | CAN_QUEUE, CMD_PER_LUN, PAS16_PUBLIC_RELEASE); | ||
449 | NCR5380_print_options(instance); | ||
450 | printk("\n"); | ||
451 | |||
452 | ++current_override; | 441 | ++current_override; |
453 | ++count; | 442 | ++count; |
454 | } | 443 | } |
@@ -586,6 +575,7 @@ static struct scsi_host_template driver_template = { | |||
586 | .proc_name = "pas16", | 575 | .proc_name = "pas16", |
587 | .show_info = pas16_show_info, | 576 | .show_info = pas16_show_info, |
588 | .write_info = pas16_write_info, | 577 | .write_info = pas16_write_info, |
578 | .info = pas16_info, | ||
589 | .queuecommand = pas16_queue_command, | 579 | .queuecommand = pas16_queue_command, |
590 | .eh_abort_handler = pas16_abort, | 580 | .eh_abort_handler = pas16_abort, |
591 | .eh_bus_reset_handler = pas16_bus_reset, | 581 | .eh_bus_reset_handler = pas16_bus_reset, |
diff --git a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h index 489acb5bf299..bf589850e8ca 100644 --- a/drivers/scsi/pas16.h +++ b/drivers/scsi/pas16.h | |||
@@ -143,6 +143,7 @@ | |||
143 | #define NCR5380_queue_command pas16_queue_command | 143 | #define NCR5380_queue_command pas16_queue_command |
144 | #define NCR5380_abort pas16_abort | 144 | #define NCR5380_abort pas16_abort |
145 | #define NCR5380_bus_reset pas16_bus_reset | 145 | #define NCR5380_bus_reset pas16_bus_reset |
146 | #define NCR5380_info pas16_info | ||
146 | #define NCR5380_show_info pas16_show_info | 147 | #define NCR5380_show_info pas16_show_info |
147 | #define NCR5380_write_info pas16_write_info | 148 | #define NCR5380_write_info pas16_write_info |
148 | 149 | ||
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index b00d97557cff..97cd0071c9aa 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -131,12 +131,6 @@ | |||
131 | * be able to coexist with appropriate changes to the high level | 131 | * be able to coexist with appropriate changes to the high level |
132 | * SCSI code. | 132 | * SCSI code. |
133 | * | 133 | * |
134 | * A NCR5380_PUBLIC_REVISION macro is provided, with the release | ||
135 | * number (updated for each public release) printed by the | ||
136 | * NCR5380_print_options command, which should be called from the | ||
137 | * wrapper detect function, so that I know what release of the driver | ||
138 | * users are using. | ||
139 | * | ||
140 | * Issues specific to the NCR5380 : | 134 | * Issues specific to the NCR5380 : |
141 | * | 135 | * |
142 | * When used in a PIO or pseudo-dma mode, the NCR5380 is a braindead | 136 | * When used in a PIO or pseudo-dma mode, the NCR5380 is a braindead |
@@ -234,7 +228,6 @@ | |||
234 | * NCR5380_queue_command | 228 | * NCR5380_queue_command |
235 | * NCR5380_reset | 229 | * NCR5380_reset |
236 | * NCR5380_abort | 230 | * NCR5380_abort |
237 | * NCR5380_proc_info | ||
238 | * | 231 | * |
239 | * to be the global entry points into the specific driver, ie | 232 | * to be the global entry points into the specific driver, ie |
240 | * #define NCR5380_queue_command t128_queue_command. | 233 | * #define NCR5380_queue_command t128_queue_command. |
@@ -246,8 +239,7 @@ | |||
246 | * The generic driver is initialized by calling NCR5380_init(instance), | 239 | * The generic driver is initialized by calling NCR5380_init(instance), |
247 | * after setting the appropriate host specific fields and ID. If the | 240 | * after setting the appropriate host specific fields and ID. If the |
248 | * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance, | 241 | * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance, |
249 | * possible) function may be used. Before the specific driver initialization | 242 | * possible) function may be used. |
250 | * code finishes, NCR5380_print_options should be called. | ||
251 | */ | 243 | */ |
252 | 244 | ||
253 | static struct Scsi_Host *first_instance = NULL; | 245 | static struct Scsi_Host *first_instance = NULL; |
@@ -616,30 +608,49 @@ static inline void NCR5380_all_init (void) | |||
616 | } | 608 | } |
617 | } | 609 | } |
618 | 610 | ||
619 | 611 | /** | |
620 | /* | 612 | * NCR58380_info - report driver and host information |
621 | * Function : void NCR58380_print_options (struct Scsi_Host *instance) | 613 | * @instance: relevant scsi host instance |
622 | * | 614 | * |
623 | * Purpose : called by probe code indicating the NCR5380 driver | 615 | * For use as the host template info() handler. |
624 | * options that were selected. | ||
625 | * | 616 | * |
626 | * Inputs : instance, pointer to this instance. Unused. | 617 | * Locks: none |
627 | */ | 618 | */ |
628 | 619 | ||
629 | static void __init NCR5380_print_options (struct Scsi_Host *instance) | 620 | static const char *NCR5380_info(struct Scsi_Host *instance) |
630 | { | 621 | { |
631 | printk(" generic options" | 622 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
623 | |||
624 | return hostdata->info; | ||
625 | } | ||
626 | |||
627 | static void prepare_info(struct Scsi_Host *instance) | ||
628 | { | ||
629 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | ||
630 | |||
631 | snprintf(hostdata->info, sizeof(hostdata->info), | ||
632 | "%s, io_port 0x%lx, n_io_port %d, " | ||
633 | "base 0x%lx, irq %d, " | ||
634 | "can_queue %d, cmd_per_lun %d, " | ||
635 | "sg_tablesize %d, this_id %d, " | ||
636 | "options { %s} ", | ||
637 | instance->hostt->name, instance->io_port, instance->n_io_port, | ||
638 | instance->base, instance->irq, | ||
639 | instance->can_queue, instance->cmd_per_lun, | ||
640 | instance->sg_tablesize, instance->this_id, | ||
641 | #ifdef DIFFERENTIAL | ||
642 | "DIFFERENTIAL " | ||
643 | #endif | ||
632 | #ifdef REAL_DMA | 644 | #ifdef REAL_DMA |
633 | " REAL DMA" | 645 | "REAL_DMA " |
634 | #endif | 646 | #endif |
635 | #ifdef PARITY | 647 | #ifdef PARITY |
636 | " PARITY" | 648 | "PARITY " |
637 | #endif | 649 | #endif |
638 | #ifdef SUPPORT_TAGS | 650 | #ifdef SUPPORT_TAGS |
639 | " SCSI-2 TAGGED QUEUING" | 651 | "SUPPORT_TAGS " |
640 | #endif | 652 | #endif |
641 | ); | 653 | ""); |
642 | printk(" generic release=%d", NCR5380_PUBLIC_RELEASE); | ||
643 | } | 654 | } |
644 | 655 | ||
645 | /* | 656 | /* |
@@ -784,7 +795,9 @@ static int __init NCR5380_init(struct Scsi_Host *instance, int flags) | |||
784 | the_template = instance->hostt; | 795 | the_template = instance->hostt; |
785 | first_instance = instance; | 796 | first_instance = instance; |
786 | } | 797 | } |
787 | 798 | ||
799 | prepare_info(instance); | ||
800 | |||
788 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); | 801 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); |
789 | NCR5380_write(MODE_REG, MR_BASE); | 802 | NCR5380_write(MODE_REG, MR_BASE); |
790 | NCR5380_write(TARGET_COMMAND_REG, 0); | 803 | NCR5380_write(TARGET_COMMAND_REG, 0); |
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c index 3e6386252953..9bae5f6122a7 100644 --- a/drivers/scsi/sun3_scsi.c +++ b/drivers/scsi/sun3_scsi.c | |||
@@ -286,19 +286,6 @@ static int __init sun3scsi_detect(struct scsi_host_template *tpnt) | |||
286 | #endif | 286 | #endif |
287 | } | 287 | } |
288 | 288 | ||
289 | pr_info("scsi%d: %s at port %lX irq", instance->host_no, | ||
290 | tpnt->proc_name, instance->io_port); | ||
291 | if (instance->irq == NO_IRQ) | ||
292 | printk ("s disabled"); | ||
293 | else | ||
294 | printk (" %d", instance->irq); | ||
295 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", | ||
296 | instance->can_queue, instance->cmd_per_lun, | ||
297 | SUN3SCSI_PUBLIC_RELEASE); | ||
298 | printk("\nscsi%d:", instance->host_no); | ||
299 | NCR5380_print_options(instance); | ||
300 | printk("\n"); | ||
301 | |||
302 | dregs->csr = 0; | 289 | dregs->csr = 0; |
303 | udelay(SUN3_DMA_DELAY); | 290 | udelay(SUN3_DMA_DELAY); |
304 | dregs->csr = CSR_SCSI | CSR_FIFO | CSR_INTR; | 291 | dregs->csr = CSR_SCSI | CSR_FIFO | CSR_INTR; |
@@ -380,11 +367,6 @@ static void sun3_scsi_reset_boot(struct Scsi_Host *instance) | |||
380 | } | 367 | } |
381 | #endif | 368 | #endif |
382 | 369 | ||
383 | static const char *sun3scsi_info(struct Scsi_Host *spnt) | ||
384 | { | ||
385 | return ""; | ||
386 | } | ||
387 | |||
388 | // safe bits for the CSR | 370 | // safe bits for the CSR |
389 | #define CSR_GOOD 0x060f | 371 | #define CSR_GOOD 0x060f |
390 | 372 | ||
diff --git a/drivers/scsi/sun3_scsi.h b/drivers/scsi/sun3_scsi.h index cb9d2a488404..3b8a05ca3625 100644 --- a/drivers/scsi/sun3_scsi.h +++ b/drivers/scsi/sun3_scsi.h | |||
@@ -74,6 +74,7 @@ | |||
74 | #define NCR5380_bus_reset sun3scsi_bus_reset | 74 | #define NCR5380_bus_reset sun3scsi_bus_reset |
75 | #define NCR5380_abort sun3scsi_abort | 75 | #define NCR5380_abort sun3scsi_abort |
76 | #define NCR5380_show_info sun3scsi_show_info | 76 | #define NCR5380_show_info sun3scsi_show_info |
77 | #define NCR5380_info sun3scsi_info | ||
77 | #define NCR5380_dma_xfer_len(i, cmd, phase) \ | 78 | #define NCR5380_dma_xfer_len(i, cmd, phase) \ |
78 | sun3scsi_dma_xfer_len(cmd->SCp.this_residual,cmd,((phase) & SR_IO) ? 0 : 1) | 79 | sun3scsi_dma_xfer_len(cmd->SCp.this_residual,cmd,((phase) & SR_IO) ? 0 : 1) |
79 | 80 | ||
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index ad833689b311..60aff4ed4cbf 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c | |||
@@ -249,16 +249,6 @@ found: | |||
249 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); | 249 | printk("scsi%d : irq = %d\n", instance->host_no, instance->irq); |
250 | #endif | 250 | #endif |
251 | 251 | ||
252 | printk("scsi%d : at 0x%08lx", instance->host_no, instance->base); | ||
253 | if (instance->irq == NO_IRQ) | ||
254 | printk (" interrupts disabled"); | ||
255 | else | ||
256 | printk (" irq %d", instance->irq); | ||
257 | printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d", | ||
258 | CAN_QUEUE, CMD_PER_LUN, T128_PUBLIC_RELEASE); | ||
259 | NCR5380_print_options(instance); | ||
260 | printk("\n"); | ||
261 | |||
262 | ++current_override; | 252 | ++current_override; |
263 | ++count; | 253 | ++count; |
264 | } | 254 | } |
@@ -411,6 +401,7 @@ static struct scsi_host_template driver_template = { | |||
411 | .proc_name = "t128", | 401 | .proc_name = "t128", |
412 | .show_info = t128_show_info, | 402 | .show_info = t128_show_info, |
413 | .write_info = t128_write_info, | 403 | .write_info = t128_write_info, |
404 | .info = t128_info, | ||
414 | .queuecommand = t128_queue_command, | 405 | .queuecommand = t128_queue_command, |
415 | .eh_abort_handler = t128_abort, | 406 | .eh_abort_handler = t128_abort, |
416 | .eh_bus_reset_handler = t128_bus_reset, | 407 | .eh_bus_reset_handler = t128_bus_reset, |
diff --git a/drivers/scsi/t128.h b/drivers/scsi/t128.h index 9f06c1851069..806dda75820a 100644 --- a/drivers/scsi/t128.h +++ b/drivers/scsi/t128.h | |||
@@ -116,6 +116,7 @@ | |||
116 | #define NCR5380_queue_command t128_queue_command | 116 | #define NCR5380_queue_command t128_queue_command |
117 | #define NCR5380_abort t128_abort | 117 | #define NCR5380_abort t128_abort |
118 | #define NCR5380_bus_reset t128_bus_reset | 118 | #define NCR5380_bus_reset t128_bus_reset |
119 | #define NCR5380_info t128_info | ||
119 | #define NCR5380_show_info t128_show_info | 120 | #define NCR5380_show_info t128_show_info |
120 | #define NCR5380_write_info t128_write_info | 121 | #define NCR5380_write_info t128_write_info |
121 | 122 | ||