2010-07-07 11:12:45 +00:00
|
|
|
From: Oliver Neukum <oneukum@suse.de>
|
|
|
|
Subject: fix medium presence misdetection in usb storage device
|
|
|
|
References: bnc#362850
|
|
|
|
Patch-mainline: not yet
|
|
|
|
|
|
|
|
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
|
2011-04-19 20:09:59 +00:00
|
|
|
@@ -1390,8 +1390,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
|
2010-07-07 11:12:45 +00:00
|
|
|
* 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;
|