From 96e2f08abccf97de20ef0322baa891829bffa651 Mon Sep 17 00:00:00 2001 From: TARUISI Hiroaki Date: Thu, 11 Aug 2011 20:25:20 +0900 Subject: [PATCH] --- yaml --- r: 270995 b: refs/heads/master c: dfcf7775815504d13a1d273073810058caf84b9d h: refs/heads/master i: 270993: b6b248521c6f9d588b6438b6e7cfdae68a6b5eb1 270991: ddd5427666581ea7e65748a4967d72b0bb565367 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/scsi_error.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 4e716cf90acf..46c9146acfb6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ada7fc5d4c4ddeb15bb624045fa3b36ddc025e6 +refs/heads/master: dfcf7775815504d13a1d273073810058caf84b9d diff --git a/trunk/drivers/scsi/scsi_error.c b/trunk/drivers/scsi/scsi_error.c index a4b9cdbaaa0b..dc6131e6a1ba 100644 --- a/trunk/drivers/scsi/scsi_error.c +++ b/trunk/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