From: Andries.Brouwer@cwi.nl
To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Cc: torvalds@transmeta.com
Subject: [patch] NCR5380.c fix
Date: Fri, 16 May 2003 00:45:10 +0200 (MEST) [thread overview]
Message-ID: <UTC200305152245.h4FMjAj26766.aeb@smtp.cwi.nl> (raw)
Several SCSI drivers confuse CHECK_CONDITION and CHECK_CONDITION << 1.
One of them is NCR5380.c. Below a patch adding status_byte() twice.
(On the other hand, sun3_NCR5380.c does this right, and generally
looks better. Maybe they can be merged eventually.)
Andries
(This was for 2.5.68. I think 2.5.69 will differ by 1 line.)
diff -u --recursive --new-file -X /linux/dontdiff a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
--- a/drivers/scsi/NCR5380.c Wed Mar 5 04:29:03 2003
+++ b/drivers/scsi/NCR5380.c Fri May 16 01:42:51 2003
@@ -2466,11 +2466,11 @@
if (cmd->cmnd[0] != REQUEST_SENSE)
cmd->result = cmd->SCp.Status | (cmd->SCp.Message << 8);
- else if (cmd->SCp.Status != GOOD)
+ else if (status_byte(cmd->SCp.Status) != GOOD)
cmd->result = (cmd->result & 0x00ffff) | (DID_ERROR << 16);
#ifdef AUTOSENSE
- if ((cmd->cmnd[0] != REQUEST_SENSE) && (cmd->SCp.Status == CHECK_CONDITION)) {
+ if ((cmd->cmnd[0] != REQUEST_SENSE) && (status_byte(cmd->SCp.Status) == CHECK_CONDITION)) {
dprintk(NDEBUG_AUTOSENSE, ("scsi%d : performing request sense\n", instance->host_no));
cmd->cmnd[0] = REQUEST_SENSE;
cmd->cmnd[1] &= 0xe0;
next reply other threads:[~2003-05-15 22:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-15 22:45 Andries.Brouwer [this message]
2003-05-15 22:52 ` James Bottomley
2003-05-15 23:16 ` Douglas Gilbert
2003-05-15 23:10 Andries.Brouwer
2003-05-15 23:12 ` James Bottomley
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=UTC200305152245.h4FMjAj26766.aeb@smtp.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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®