From: Willem Riede <wrlk@riede.org>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ide-scsi fails to call idescsi_check_condition for things like "Medium not present"
Date: Mon, 31 Oct 2005 00:03:49 +0000 [thread overview]
Message-ID: <1130717029l.3354l.18l@serve.riede.org> (raw)
This patch started life as a response to fedora specific ide subsystem changes
that made error handling of my ATAPI tape drive fail; the specifics are in
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=160868
The insertion of the statement rq->errors = err; near the end of
ide_end_drive_cmd() in drivers/ide/ide-io.c means that rq->errors does not
contain what it needs to in idescsi_end_request() in drivers/scsi/ide-scsi.c
anymore. Recent mainline kernels now also have this change.
The patch below makes ide-scsi whole.
Signed-off-by: Willem Riede <wrlk@riede.org>
--- linux-2.6.14/drivers/scsi/ide-scsi.c 2005-10-27 20:02:08.000000000
-0400
+++ linux-2.6.14w/drivers/scsi/ide-scsi.c 2005-10-29 09:22:47.000000000
-0400
@@ -389,6 +389,7 @@
int log = test_bit(IDESCSI_LOG_CMD, &scsi->log);
struct Scsi_Host *host;
u8 *scsi_buf;
+ int errors = rq->errors;
unsigned long flags;
if (!(rq->flags & (REQ_SPECIAL|REQ_SENSE))) {
@@ -415,11 +416,11 @@
printk (KERN_WARNING "ide-scsi: %s: timed out for
%lu\n",
drive->name, pc->scsi_cmd->serial_number);
pc->scsi_cmd->result = DID_TIME_OUT << 16;
- } else if (rq->errors >= ERROR_MAX) {
+ } else if (errors >= ERROR_MAX) {
pc->scsi_cmd->result = DID_ERROR << 16;
if (log)
printk ("ide-scsi: %s: I/O error for %lu\n",
drive->name, pc->scsi_cmd->serial_number);
- } else if (rq->errors) {
+ } else if (errors) {
if (log)
printk ("ide-scsi: %s: check condition for %lu\n",
drive->name, pc->scsi_cmd->serial_number);
if (!idescsi_check_condition(drive, rq))
next reply other threads:[~2005-10-31 0:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-31 0:03 Willem Riede [this message]
2005-11-09 22:16 ` Bartlomiej Zolnierkiewicz
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=1130717029l.3354l.18l@serve.riede.org \
--to=wrlk@riede.org \
--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®