From: "Tony Battersby" <tonyb@cybernetics.com>
To: andrew.vasquez@qlogic.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] qla2xxx data transfer direction
Date: Thu, 13 May 2004 10:12:58 -0400 [thread overview]
Message-ID: <04May13.101302edt.332201@cyborg.cybernetics.com> (raw)
I am using a QLogic QLA2200 under Linux 2.4.26 with qla2200.o version
6.06.10 from QLogic's website.
The qla2200 driver doesn't do auto-sense if the sense length is greater
than 32 bytes. When a command fails with check condition and the driver
doesn't do auto-sense, the SCSI midlayer sends a request sense command
with scsi_cmnd::cmnd holding the request sense CDB and
scsi_cmnd::data_cmnd holding the CDB of the failed command. The qla2200
driver determines the expected data direction by looking at
scsi_cmnd::data_cmd[0]. If the original command was a data out command
(e.g. mode select), then the qla2200 driver sets the data direction for
the request sense command incorrectly, causing it to fail. The midlayer
gets into an endless loop trying to retrieve the sense data.
The following patch fixes the problem. Note that there are a few other
uses of scsi_cmnd::data_cmnd in qla2x00.c under #if VSA, but I'm not
sure if they are correct or not. Someone else will have to determine
that.
Anthony J. Battersby
Cybernetics
--- drivers/scsi/qla2xxx/qla2x00.c.orig Thu May 13 09:24:22 2004
+++ drivers/scsi/qla2xxx/qla2x00.c Thu May 13 09:29:05 2004
@@ -9642,7 +9642,7 @@
if (1)
#endif //__VMWARE__
{
- switch (cmd->data_cmnd[0]) {
+ switch (cmd->cmnd[0]) {
case FORMAT_UNIT:
case WRITE_6:
case MODE_SELECT:
@@ -9666,7 +9666,7 @@
}
}
#else
- switch (cmd->data_cmnd[0]) {
+ switch (cmd->cmnd[0]) {
case FORMAT_UNIT:
case WRITE_6:
case MODE_SELECT:
@@ -10173,7 +10173,7 @@
if (1)
#endif //__VMWARE__
{
- switch (cmd->data_cmnd[0]) {
+ switch (cmd->cmnd[0]) {
case FORMAT_UNIT:
case WRITE_6:
case MODE_SELECT:
@@ -10197,7 +10197,7 @@
}
}
#else
- switch (cmd->data_cmnd[0]) {
+ switch (cmd->cmnd[0]) {
case FORMAT_UNIT:
case WRITE_6:
case MODE_SELECT:
next reply other threads:[~2004-05-13 14:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-13 14:12 Tony Battersby [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-05-13 14:49 [PATCH] qla2xxx data transfer direction Andrew Vasquez
2004-05-13 21:51 ` Amit D. Chaudhary
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=04May13.101302edt.332201@cyborg.cybernetics.com \
--to=tonyb@cybernetics.com \
--cc=andrew.vasquez@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
/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