diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-29 09:51:07 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-11-29 09:51:07 (GMT) |
commit | 0d2cd91bf7b1a7cc1d638296111fcc2bcf5c0bb4 (patch) | |
tree | d2ca69347816c27f9dc352581f5d0fe76811cd49 /drivers/scsi/scsi_error.c | |
parent | 3d95fd6ad8d3cf582a70ed65660017114b6e4065 (diff) | |
parent | caca6a03d365883564885f2c1da3e88dcf65d139 (diff) | |
download | linux-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.c | 12 |
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 |