]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.fixes/sd_liberal_28_sense_invalid.diff
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / sd_liberal_28_sense_invalid.diff
diff --git a/src/patches/suse-2.6.27.31/patches.fixes/sd_liberal_28_sense_invalid.diff b/src/patches/suse-2.6.27.31/patches.fixes/sd_liberal_28_sense_invalid.diff
new file mode 100644 (file)
index 0000000..00ec3e9
--- /dev/null
@@ -0,0 +1,27 @@
+From: Oliver Neukum <oneukum@suse.de>
+Subject: fix medium presence misdetection in usb storage device 
+References: bnc#362850
+
+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.
+
+Signed-off-by: Brandon Philips <bphilips@suse.de>
+
+---
+ drivers/scsi/sd.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -1208,8 +1208,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;