All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: linux-scsi@vger.kernel.org
Subject: [patch]liberal acceptance of 0x28 asc in sd.c
Date: Thu, 30 Oct 2008 13:09:41 +0100	[thread overview]
Message-ID: <200810301309.41705.oliver@neukum.org> (raw)

Hi,

>From reading the SCSI spec it seems that having the valid bit 0 (0x70
checked in scsi_sense_valid) should does not invalidate the ASC or ASQ.
[See page 37 of spc4r02.pdf].  It should only invalidate the INFORMATION
field. Therefore remove the sense_valid check from the USB quirk.

This is needed for a strange USB storage device.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Oliver Neukum <oneukum@suse.de>

---

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index e5e7d78..ac119a0 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1204,8 +1204,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
 		 * Yes, this sense key/ASC combination shouldn't
 		 * occur here.  It's characteristic of these devices.
 		 */
-		} else if (sense_valid &&
-				sshdr.sense_key == UNIT_ATTENTION &&
+		} else if (sshdr.sense_key == UNIT_ATTENTION &&
 				sshdr.asc == 0x28) {
 			if (!spintime) {
 				spintime_expire = jiffies + 5 * HZ;

             reply	other threads:[~2008-10-30 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 12:09 Oliver Neukum [this message]
2008-10-30 14:01 ` [patch]liberal acceptance of 0x28 asc in sd.c James Bottomley
2008-10-30 14:23   ` Oliver Neukum

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=200810301309.41705.oliver@neukum.org \
    --to=oliver@neukum.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.