From: Patrick Mansfield <patmans@us.ibm.com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: linux-scsi@vger.kernel.org,
Andrew Vasquez <andrew.vasquez@qlogic.com>,
James Smart <James.Smart@Emulex.Com>
Subject: Re: [PATCH RFC 1/2] add transport scan callout to fix sysfs layout when scanning from userspace
Date: Tue, 24 May 2005 17:30:44 -0700 [thread overview]
Message-ID: <20050525003044.GA6564@us.ibm.com> (raw)
In-Reply-To: <20050524230143.GA6407@us.ibm.com>
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;
next prev parent reply other threads:[~2005-05-25 0:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-21 21:37 [PATCH RFC 1/2] add transport scan callout to fix sysfs layout when scanning from userspace Mike Christie
2005-05-24 23:01 ` Patrick Mansfield
2005-05-25 0:30 ` Patrick Mansfield [this message]
2005-05-25 0:41 ` Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050525003044.GA6564@us.ibm.com \
--to=patmans@us.ibm.com \
--cc=James.Smart@Emulex.Com \
--cc=andrew.vasquez@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox