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 /drivers/scsi/arm | |
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>
Diffstat (limited to 'drivers/scsi/arm')
-rw-r--r-- | drivers/scsi/arm/cumana_1.c | 14 | ||||
-rw-r--r-- | drivers/scsi/arm/oak.c | 14 |
2 files changed, 2 insertions, 26 deletions
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; |