]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS
authorMartin Wilck <mwilck@suse.com>
Tue, 17 Apr 2018 23:35:11 +0000 (01:35 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Apr 2018 23:14:36 +0000 (19:14 -0400)
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>
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_error.c
include/scsi/scsi_devinfo.h

index 87bc50686ac653cb6463129ba1d48571809dc9e7..c4cbfd07b9167f0e29b635b9b24e65a6df3826d9 100644 (file)
@@ -168,6 +168,7 @@ static struct {
        {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN},
        {"easyRAID", "F8", NULL, BLIST_NOREPORTLUN},
        {"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+       {"FUJITSU", "ETERNUS_DXM", "*", BLIST_RETRY_ASC_C1},
        {"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN | BLIST_INQUIRY_36},
        {"Generic", "USB Storage-SMC", NULL, BLIST_FORCELUN | BLIST_INQUIRY_36}, /* FW: 0180 and 0207 */
        {"HITACHI", "DF400", "*", BLIST_REPORTLUN2},
index 633b198ed895e0d07b48924b8a3d7491089893a1..94d2047e0096aee29eb3238aa69982a1306ef2dc 100644 (file)
@@ -528,6 +528,9 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
 
                if (sshdr.asc == 0x44 && sdev->sdev_bflags & BLIST_RETRY_ITF)
                        return ADD_TO_MLQUEUE;
+               if (sshdr.asc == 0xc1 && sshdr.ascq == 0x01 &&
+                   sdev->sdev_bflags & BLIST_RETRY_ASC_C1)
+                       return ADD_TO_MLQUEUE;
 
                return NEEDS_RETRY;
        case NOT_READY:
index 91a327edf1fa19933a49fce8f2b63128eb9681ee..3fdb322d4c4bbeaba31fc0ac0a5a912d924637f6 100644 (file)
 #define BLIST_UNMAP_LIMIT_WS   ((__force blist_flags_t)(1ULL << 31))
 /* Always retry ABORTED_COMMAND with Internal Target Failure */
 #define BLIST_RETRY_ITF                ((__force blist_flags_t)(1ULL << 32))
+/* Always retry ABORTED_COMMAND with ASC 0xc1 */
+#define BLIST_RETRY_ASC_C1     ((__force blist_flags_t)(1ULL << 33))
 
-#define __BLIST_LAST_USED BLIST_RETRY_ITF
+#define __BLIST_LAST_USED BLIST_RETRY_ASC_C1
 
 #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \
                               (__force blist_flags_t) \