summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoger, Babu <Babu.Moger@netapp.com>2011-10-06 13:22:07 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 10:57:27 -0500
commitbf81973a5d907ca1226e295ef67f650b8f4e9b4c (patch)
tree57f80e1a9a23a6630a1b3f3c642aaaad60307bef
parent14ed9cc7e7b9a95d56c2bf91cab2f010968d6e73 (diff)
downloadlinux-3.10-bf81973a5d907ca1226e295ef67f650b8f4e9b4c.tar.gz
linux-3.10-bf81973a5d907ca1226e295ef67f650b8f4e9b4c.tar.bz2
linux-3.10-bf81973a5d907ca1226e295ef67f650b8f4e9b4c.zip
[SCSI] scsi_dh_alua: Add one more check-condition for alua handler
This patch adds one more check-condition for scsi_dh_alua handler. Without this, the handler attach fails sometimes during the discovery. I have noticed this with NetApp E-Series storage with alua mode. Also removed some unnecessary brackets {} for consistency. Signed-off-by: Babu Moger <babu.moger@netapp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/device_handler/scsi_dh_alua.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 9dce3670f8d..627f4b5e517 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -465,27 +465,28 @@ static int alua_check_sense(struct scsi_device *sdev,
* Power On, Reset, or Bus Device Reset, just retry.
*/
return ADD_TO_MLQUEUE;
- if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06) {
+ if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x06)
/*
* ALUA state changed
*/
return ADD_TO_MLQUEUE;
- }
- if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07) {
+ if (sense_hdr->asc == 0x2a && sense_hdr->ascq == 0x07)
/*
* Implicit ALUA state transition failed
*/
return ADD_TO_MLQUEUE;
- }
- if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x0e) {
+ if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x03)
+ /*
+ * Inquiry data has changed
+ */
+ return ADD_TO_MLQUEUE;
+ if (sense_hdr->asc == 0x3f && sense_hdr->ascq == 0x0e)
/*
* REPORTED_LUNS_DATA_HAS_CHANGED is reported
* when switching controllers on targets like
* Intel Multi-Flex. We can just retry.
*/
return ADD_TO_MLQUEUE;
- }
-
break;
}