]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/sd_liberal_28_sense_invalid.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / sd_liberal_28_sense_invalid.diff
1 From: Oliver Neukum <oneukum@suse.de>
2 Subject: fix medium presence misdetection in usb storage device
3 References: bnc#362850
4
5 From reading the SCSI spec it seems that having the valid bit 0 (0x70
6 checked in scsi_sense_valid) should does not invalidate the ASC or ASQ.
7 [See page 37 of spc4r02.pdf]. It should only invalidate the INFORMATION
8 field. Therefore remove the sense_valid check from the USB quirk.
9
10 Signed-off-by: Brandon Philips <bphilips@suse.de>
11
12 ---
13 drivers/scsi/sd.c | 3 +--
14 1 file changed, 1 insertion(+), 2 deletions(-)
15
16 --- a/drivers/scsi/sd.c
17 +++ b/drivers/scsi/sd.c
18 @@ -1208,8 +1208,7 @@ sd_spinup_disk(struct scsi_disk *sdkp)
19 * Yes, this sense key/ASC combination shouldn't
20 * occur here. It's characteristic of these devices.
21 */
22 - } else if (sense_valid &&
23 - sshdr.sense_key == UNIT_ATTENTION &&
24 + } else if (sshdr.sense_key == UNIT_ATTENTION &&
25 sshdr.asc == 0x28) {
26 if (!spintime) {
27 spintime_expire = jiffies + 5 * HZ;