54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
|
From: Hannes Reinecke <hare@suse.de>
|
||
|
Subject: Retry ALUA device handler initialization on Unit Attention
|
||
|
Patch-mainline: not yet
|
||
|
|
||
|
Whenever we receive a UNIT ATTENTION sense code we should just retry
|
||
|
the command. No point in checking the various sense codes here.
|
||
|
|
||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||
|
|
||
|
---
|
||
|
drivers/scsi/device_handler/scsi_dh_alua.c | 31 +++--------------------------
|
||
|
1 file changed, 4 insertions(+), 27 deletions(-)
|
||
|
|
||
|
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
|
||
|
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
|
||
|
@@ -495,33 +495,10 @@ static int alua_check_sense(struct scsi_
|
||
|
return SUCCESS;
|
||
|
break;
|
||
|
case UNIT_ATTENTION:
|
||
|
- if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
|
||
|
- /*
|
||
|
- * Power On, Reset, or Bus Device Reset, just retry.
|
||
|
- */
|
||
|
- return ADD_TO_MLQUEUE;
|
||
|
- 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) {
|
||
|
- /*
|
||
|
- * Implicit ALUA state transition failed
|
||
|
- */
|
||
|
- 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;
|
||
|
+ /*
|
||
|
+ * Just retry for UNIT_ATTENTION
|
||
|
+ */
|
||
|
+ return ADD_TO_MLQUEUE;
|
||
|
}
|
||
|
|
||
|
return SCSI_RETURN_NOT_HANDLED;
|