[388] in linux-scsi channel archive
Show SCSI-ID for AHA154x at boot
daemon@ATHENA.MIT.EDU (Gunther Mayer)
Mon Jul 17 16:00:02 1995
From: Gunther Mayer <gmayer@physik.uni-kl.de>
To: linux-scsi@vger.rutgers.edu
Date: Mon, 17 Jul 1995 11:23:00 +0200 (MET DST)
Hi,
this little patch prints the SCSI-ID of an AHA154xX (at least it does
with my AHA1542B, when I played with the SCSI-ID jumpers). The info
is from the AHA154x-Manual from the adaptec-ftp-site.
Though I thought you could verify if it prints valid values with other
boards before including in the kernel.
Sincerly, Gunther (gmayer@physik.uni-kl.de)
--- linux-1.2.8.ori/drivers/scsi/aha1542.c Tue May 2 06:33:59 1995
+++ linux/drivers/scsi/aha1542.c Wed Jun 21 09:32:22 1995
@@ -713,7 +713,7 @@
aha1542_intr_reset(bse);
}
-static int aha1542_getconfig(int base_io, unsigned char * irq_level, unsigned char * dma_chan)
+static int aha1542_getconfig(int base_io, unsigned char * irq_level, unsigned char * dma_chan, unsigned char * scsi_id)
{
unchar inquiry_cmd[] = {CMD_RETCONF };
unchar inquiry_result[3];
@@ -775,6 +775,7 @@
printk("Unable to determine Adaptec IRQ level. Disabling board\n");
return -1;
};
+ *scsi_id=inquiry_result[2] & 7;
return 0;
}
@@ -918,6 +919,7 @@
{
unsigned char dma_chan;
unsigned char irq_level;
+ unsigned char scsi_id;
unsigned long flags;
unsigned int base_io;
int trans;
@@ -977,9 +979,9 @@
}
if(aha1542_query(base_io, &trans)) goto unregister;
- if (aha1542_getconfig(base_io, &irq_level, &dma_chan) == -1) goto unregister;
+ if (aha1542_getconfig(base_io, &irq_level, &dma_chan, &scsi_id) == -1) goto unregister;
- printk("Configuring Adaptec at IO:%x, IRQ %d",base_io, irq_level);
+ printk("Configuring Adaptec (SCSI-ID %d) at IO:%x, IRQ %d", scsi_id, base_io, irq_level);
if (dma_chan != 0xFF)
printk(", DMA priority %d", dma_chan);
printk("\n");