aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2018-04-17 19:35:11 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-20 19:14:36 -0400
commitc360652006bba40837cf16d5099ea61f7ce16c63 (patch)
treec3c4e5683c0b41737e8d2040789180cef184120d
parent29cfc2ab71d9642c2f4fda6cd278309cc253ff82 (diff)
scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS
On Fujitsu ETERNUS systems, sense code ABORTED COMMAND with ASC/Q C1/01 is used to indicate temporary condition where the storage-internal path to a target is switched from one controller to another. SCSI commands that return with this error code must be retried unconditionally (i.e. without the "maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV commands. Introduce a new blist flag for this case. [mkp: applied by hand] Signed-off-by: Martin Wilck <mwilck@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/scsi_devinfo.c1
-rw-r--r--drivers/scsi/scsi_error.c3
-rw-r--r--include/scsi/scsi_devinfo.h4
3 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index 87bc50686ac6..c4cbfd07b916 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -168,6 +168,7 @@ static struct {
168 {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN}, 168 {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN},
169 {"easyRAID", "F8", NULL, BLIST_NOREPORTLUN}, 169 {"easyRAID", "F8", NULL, BLIST_NOREPORTLUN},
170 {"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, 170 {"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
171 {"FUJITSU", "ETERNUS_DXM", "*", BLIST_RETRY_ASC_C1},
171 {"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN | BLIST_INQUIRY_36}, 172 {"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN | BLIST_INQUIRY_36},
172 {"Generic", "USB Storage-SMC", NULL, BLIST_FORCELUN | BLIST_INQUIRY_36}, /* FW: 0180 and 0207 */ 173 {"Generic", "USB Storage-SMC", NULL, BLIST_FORCELUN | BLIST_INQUIRY_36}, /* FW: 0180 and 0207 */
173 {"HITACHI", "DF400", "*", BLIST_REPORTLUN2}, 174 {"HITACHI", "DF400", "*", BLIST_REPORTLUN2},
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 633b198ed895..94d2047e0096 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -528,6 +528,9 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
528 528
529 if (sshdr.asc == 0x44 && sdev->sdev_bflags & BLIST_RETRY_ITF) 529 if (sshdr.asc == 0x44 && sdev->sdev_bflags & BLIST_RETRY_ITF)
530 return ADD_TO_MLQUEUE; 530 return ADD_TO_MLQUEUE;
531 if (sshdr.asc == 0xc1 && sshdr.ascq == 0x01 &&
532 sdev->sdev_bflags & BLIST_RETRY_ASC_C1)
533 return ADD_TO_MLQUEUE;
531 534
532 return NEEDS_RETRY; 535 return NEEDS_RETRY;
533 case NOT_READY: 536 case NOT_READY:
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 91a327edf1fa..3fdb322d4c4b 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -65,8 +65,10 @@
65#define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31)) 65#define BLIST_UNMAP_LIMIT_WS ((__force blist_flags_t)(1ULL << 31))
66/* Always retry ABORTED_COMMAND with Internal Target Failure */ 66/* Always retry ABORTED_COMMAND with Internal Target Failure */
67#define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32)) 67#define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32))
68/* Always retry ABORTED_COMMAND with ASC 0xc1 */
69#define BLIST_RETRY_ASC_C1 ((__force blist_flags_t)(1ULL << 33))
68 70
69#define __BLIST_LAST_USED BLIST_RETRY_ITF 71#define __BLIST_LAST_USED BLIST_RETRY_ASC_C1
70 72
71#define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ 73#define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \
72 (__force blist_flags_t) \ 74 (__force blist_flags_t) \