host unique_id for aic7xxx driver

Elgin Lee ehl at
Sat Oct 3 10:50:49 PDT 1998

I'm trying to bring up scsidev 1.5 on my Linux 2.0.35 system, but I'm
encountering a minor problem involving the aic7xxx 5.1.0pre15 driver.

scsidev uses the host unique_id to distinguish between different
controllers (and uses unique_id in the generated device node names),
but the aic7xxx 5.1.0pre15 driver doesn't set that parameter (leaving
it at the default value of zero).  As I have two Adaptec 2940UX
controllers, that causes scsidev to alias /dev/scsi/sdh7-* device
nodes between the two controllers.

I patched that problem by setting the unique_id to the host_no (see
below), but I'm not all that clear on the semantics of host_no,
unique_id, and the other host parameters.  I chose host_no rather
than, say, io_port simply because I prefer to see the host number in
the device node name, rather the ioport address.

I'm not running development kernels, so I don't know if devfs is
similarly affected by the defaulting of unique_id.

Is the host_no a reasonable choice for the unique_id, or is some
other parameter preferable?


P.S. If other people are thinking of using scsidev with the aic7xxx
5.1.x series, be aware that you'll have to patch scsidev for some
other issues as well.  For example, scsidev's hostname buffer (size
60) overflows because the aic7xxx driver returns a name of length 117
on my system.

--- linux/drivers/scsi/aic7xxx.c.pre15	Sat Oct  3 02:03:19 1998
+++ linux/drivers/scsi/aic7xxx.c	Sat Oct  3 02:08:04 1998
@@ -7452,6 +7452,7 @@
   host->n_io_port = 0xFF;
   host->base = (unsigned char *) p->mbase;
   host->irq = p->irq;
+  host->unique_id = host->host_no;
   if (p->features & AHC_WIDE)
     host->max_id = 16;

To Unsubscribe: send mail to majordomo at
with "unsubscribe freebsd-aic7xxx" in the body of the message

More information about the aic7xxx mailing list