[PATCH] [was SCSI host numbers? ]

From: Itai Nahshon (nahshon@actcom.co.il)
Date: Thu Mar 21 2002 - 16:48:21 EST


Hello all,

Under some scenarios Linux assigns the same
host_no to more than one scsi device.

I raised this problem a long time ago.

To repeat the problem (all recent 2.4.x and possibly 2.5.x kernels):
Use two scsi drivers that are not required for system
use (mean - not the one that drives your hard disk). I got
this problem the first time with ide-scsi and usb-storage.
Call these device drivers A and B.
Host numbers are remembered after they are assigned
until the next reboot (or until unloading scsi_mod if
it is compiled as a module). Start with a "clean" system.

modprobe A
rmmod A
modprobe B
modprobe A

And - the two adapters now have the same host number.
In this case, some functions of A will not work. Especially devices
attached to A cannot be accessed through the sg interface. I believe
that writes to /proc/scsi/scsi will not work for these devices too
(but these are useless for the drivers that I used in my tests).

See also <http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=55876>.

I gave it as much testing as I could, and I believe it is not worse
than it was. People with more SCSI hardware should be able to try
more complex cases.

I left the stuff in #ifdef + comments because I believe that the scsi
registration code needs more cleanup. I have some related questions
that I will post on a separate message to lkml.

-- Itai



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 23 2002 - 22:00:26 EST