From: Mike Anderson <andmike@us.ibm.com>
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH] scsi_error device offline fix
Date: Mon, 21 Oct 2002 00:37:18 -0700 [thread overview]
Message-ID: <20021021073718.GB3197@beaverton.ibm.com> (raw)
This patch corrects a problem in scsi error handling.
When a device is offlined indicated by a message like ...Device offlined
- not ready...
the command return status was not being updated with a failure status if
the IO was a timeout.
I tested the patch on system with ips, aic, and qlogic fc adapters, but
was unable to generate a satisfactory device offline test case.
I did test this fix on uml with scsi_debug and generated a device
offline condition with verified this fix was working correctly.
-andmike
--
Michael Anderson
andmike@us.ibm.com
scsi_error.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
------
===== drivers/scsi/scsi_error.c 1.18 vs edited =====
--- 1.18/drivers/scsi/scsi_error.c Thu Oct 17 10:52:39 2002
+++ edited/drivers/scsi/scsi_error.c Sat Oct 19 15:24:06 2002
@@ -1145,14 +1145,18 @@
if (!scsi_eh_eflags_chk(scmd, SCSI_EH_CMD_ERR))
continue;
- printk(KERN_INFO "%s: Device offlined - not"
+ printk(KERN_INFO "scsi: Device offlined - not"
" ready or command retry failed"
" after error recovery: host"
" %d channel %d id %d lun %d\n",
- __FUNCTION__, shost->host_no,
+ shost->host_no,
scmd->device->channel,
scmd->device->id,
scmd->device->lun);
+
+ if (scsi_eh_eflags_chk(scmd, SCSI_EH_CMD_TIMEOUT))
+ scmd->result |= (DRIVER_TIMEOUT << 24);
+
scmd->device->online = FALSE;
scsi_eh_finish_cmd(scmd, shost);
}
next reply other threads:[~2002-10-21 7:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-21 7:37 Mike Anderson [this message]
2002-10-21 16:39 ` Richard Gooch
2002-10-21 16:51 ` Mike Anderson
2002-10-21 16:50 ` Mike Anderson
2002-10-21 17:39 andy barlak
2002-10-21 19:33 ` Mike Anderson
2002-10-21 20:01 ` andy barlak
2002-10-21 22:52 ` Patrick Mansfield
2002-10-22 0:58 ` andy barlak
2002-10-22 15:38 ` Patrick Mansfield
2002-10-22 16:14 ` andy barlak
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=20021021073718.GB3197@beaverton.ibm.com \
--to=andmike@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®