summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2011-11-29 09:51:07 (GMT)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-11-29 09:51:07 (GMT)
commit0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4 (patch)
treed2ca69347816c27f9dc352581f5d0fe76811cd49 /drivers/scsi/scsi_error.c
parent3d95fd6ad8d3cf582a70ed65660017114b6e4065 (diff)
parentcaca6a03d365883564885f2c1da3e88dcf65d139 (diff)
downloadlinux-0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4.tar.xz
Merge commit 'v3.2-rc3' into next
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index a4b9cdb..dc6131e 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -293,8 +293,16 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
* so that we can deal with it there.
*/
if (scmd->device->expecting_cc_ua) {
- scmd->device->expecting_cc_ua = 0;
- return NEEDS_RETRY;
+ /*
+ * Because some device does not queue unit
+ * attentions correctly, we carefully check
+ * additional sense code and qualifier so as
+ * not to squash media change unit attention.
+ */
+ if (sshdr.asc != 0x28 || sshdr.ascq != 0x00) {
+ scmd->device->expecting_cc_ua = 0;
+ return NEEDS_RETRY;
+ }
}
/*
* if the device is in the process of becoming ready, we