On Tue, May 24, 2005 at 04:01:43PM -0700, Patrick Mansfield wrote: > I was trying FC to see if it caused problems, instead of a different > layout, no devices are found at all :-( The qla2xxx_slave_alloc() is returning -ENXIO, and we don't output any printks in that case for qla2xxx. I added a couple qla_printk's and got lots of: qla2300 0000:01:0c.0: no rport for <7:0:0:0> For: echo "- - -" > /sys/class/scsi_host/hostX/scan A change similar change what Mike C. did for iSCSI is needed for FC transport, or any transport that has a "device" between the host and target. For qla, we need to eventually call its slave_alloc() with a target under an rport (so starget_to_rport() gets the rport). Having a transportt->scan seems a bit high level, I have no better suggestion, there should be a way to make this generic for all transports. It is easy for iSCSI since it has a one-to-one mapping of scsi_host to scsi_target: AFAICT you just call scsi_scan_target() once. FC has to iterate over all rports, and call scsi_scan_target() for all targets, or find the rport that matches the id. Where is iscsi_register_transport? A current git tree? I should probably be using that tree, still trying to get up to speed on git. qla2xxx debug patch, but we should always print something when returning -ENXIO: --- linux-2.6.12-rc4/drivers/scsi/qla2xxx/orig-qla_os.c Fri May 6 22:20:31 2005 +++ linux-2.6.12-rc4/drivers/scsi/qla2xxx/qla_os.c Tue May 24 16:58:14 2005 @@ -992,8 +992,12 @@ qla2xxx_slave_alloc(struct scsi_device * fc_port_t *fcport; int found; - if (!rport) + if (!rport) { + qla_printk(KERN_WARNING, ha, + "no rport for <%d:%d:%d:%d>\n", + sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); return -ENXIO; + } found = 0; list_for_each_entry(fcport, &ha->fcports, list) { @@ -1003,8 +1007,12 @@ qla2xxx_slave_alloc(struct scsi_device * break; } } - if (!found) + if (!found) { + qla_printk(KERN_WARNING, ha, + "no device at <%d:%d:%d:%d>\n", + sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); return -ENXIO; + } sdev->hostdata = fcport; - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html