Messages in this thread | | | From | Itai Nahshon <> | Subject | SCSI host numbers? | Date | Wed, 2 Jan 2002 03:19:45 +0200 |
| |
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 - 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/
| |