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>
Este commit está contenido en:

cometido por
Christoph Hellwig

padre
270ac2c290
commit
8c32513bd3
@@ -29,6 +29,7 @@
|
||||
#define NCR5380_read(reg) readb(_base + ((reg) << 2))
|
||||
#define NCR5380_write(reg, value) writeb(value, _base + ((reg) << 2))
|
||||
#define NCR5380_queue_command oakscsi_queue_command
|
||||
#define NCR5380_info oakscsi_info
|
||||
#define NCR5380_show_info oakscsi_show_info
|
||||
#define NCR5380_write_info oakscsi_write_info
|
||||
|
||||
@@ -40,11 +41,6 @@
|
||||
#undef START_DMA_INITIATOR_RECEIVE_REG
|
||||
#define START_DMA_INITIATOR_RECEIVE_REG (128 + 7)
|
||||
|
||||
const char * oakscsi_info (struct Scsi_Host *spnt)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
#define STAT ((128 + 16) << 2)
|
||||
#define DATA ((128 + 8) << 2)
|
||||
|
||||
@@ -153,14 +149,6 @@ static int oakscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
|
||||
|
||||
NCR5380_init(host, 0);
|
||||
|
||||
printk("scsi%d: at port 0x%08lx irqs disabled",
|
||||
host->host_no, host->io_port);
|
||||
printk(" options CAN_QUEUE=%d CMD_PER_LUN=%d release=%d",
|
||||
host->can_queue, host->cmd_per_lun, OAKSCSI_PUBLIC_RELEASE);
|
||||
printk("\nscsi%d:", host->host_no);
|
||||
NCR5380_print_options(host);
|
||||
printk("\n");
|
||||
|
||||
ret = scsi_add_host(host, &ec->dev);
|
||||
if (ret)
|
||||
goto out_unmap;
|
||||
|
Referencia en una nueva incidencia
Block a user