public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* SCSI host numbers?
@ 2002-01-02  1:19 Itai Nahshon
  2002-01-02 11:32 ` Alan Cox
  0 siblings, 1 reply; 13+ messages in thread
From: Itai Nahshon @ 2002-01-02  1:19 UTC (permalink / raw)
  To: linux-kernel

Hello,

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

Can someone tell me what is the intended behavior?

The problem is that a newly registered device gets
its host_no from max_scsi_host. max_scsi_host is
decremented when a device driver is unregistered
(see drivers/scsi/host.c) allowing a second new
host to reuse the same host_no.
A device that was already in use (but the module
was unloaded and reloaded gets its old host_no that
was kept in scsi_host_no_list. host_id's in scsi_host_no_list
can also be reserved at boot time (though I never tried that).

This rarely happens except when there are two or more
dynamic scsi hosts (I had i with ide-scsi and usb-storage).

I could mount devices even when they were on conflicting
host numbers (/dev/sda on usb-storage and /dev/scd0
on ide-scsi). I could access only one of the devices
via the generic-scsi interface (/dev/sgX). I do not know
what other things can get broken if scsi host get conflicting
host id.

This was tried on linux-2.4.9 (RedHat). I looked at newer
kernels but did not see an obvious fix.

Similar bug reported also to redhat. See:
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=55876

Thanks,
-- Itai

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-01-16  9:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1009934881.4099.linux-kernel2news@redhat.com>
2002-01-02  2:07 ` SCSI host numbers? Pete Zaitcev
2002-01-02  1:19 Itai Nahshon
2002-01-02 11:32 ` Alan Cox
2002-01-02 19:31   ` Richard Gooch
2002-01-02 21:01     ` Alan Cox
2002-01-02 21:18       ` Richard Gooch
2002-01-02 23:35   ` Itai Nahshon
2002-01-06  1:44     ` Richard Gooch
2002-01-13 20:41       ` Itai Nahshon
2002-01-14  6:36         ` Richard Gooch
2002-01-15 12:19           ` Itai Nahshon
2002-01-16  7:03             ` Richard Gooch
2002-01-16  9:47               ` Itai Nahshon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox