summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Wilck <mwilck@suse.com>2018-04-17 19:35:10 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-04-20 19:14:36 -0400
commit29cfc2ab71d9642c2f4fda6cd278309cc253ff82 (patch)
treed0e5a59c4a4ff37157d8077a7b2bbbcf9d596fa9
parent358fda5ff4c441dfa6e66fd3b1f7d8f882ecba8f (diff)
scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix
EMC Symmetrix returns 'internal target error' for a variety of conditions, most of which will be transient. So we should always retry it, even with failfast set. Otherwise we'd get spurious path flaps with multipath. 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.c3
-rw-r--r--drivers/scsi/scsi_error.c4
-rw-r--r--include/scsi/scsi_devinfo.h4
3 files changed, 9 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index 9603f3ef18aa..87bc50686ac6 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -161,7 +161,8 @@ static struct {
161 {"DGC", "RAID", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, storage on LUN 0 */ 161 {"DGC", "RAID", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, storage on LUN 0 */
162 {"DGC", "DISK", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, no storage on LUN 0 */ 162 {"DGC", "DISK", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, no storage on LUN 0 */
163 {"EMC", "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, 163 {"EMC", "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
164 {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_REPORTLUN2}, 164 {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN |
165 BLIST_REPORTLUN2 | BLIST_RETRY_ITF},
165 {"EMULEX", "MD21/S2 ESDI", NULL, BLIST_SINGLELUN}, 166 {"EMULEX", "MD21/S2 ESDI", NULL, BLIST_SINGLELUN},
166 {"easyRAID", "16P", NULL, BLIST_NOREPORTLUN}, 167 {"easyRAID", "16P", NULL, BLIST_NOREPORTLUN},
167 {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN}, 168 {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN},
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 946039117bf4..633b198ed895 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -38,6 +38,7 @@
38#include <scsi/scsi_host.h> 38#include <scsi/scsi_host.h>
39#include <scsi/scsi_ioctl.h> 39#include <scsi/scsi_ioctl.h>
40#include <scsi/scsi_dh.h> 40#include <scsi/scsi_dh.h>
41#include <scsi/scsi_devinfo.h>
41#include <scsi/sg.h> 42#include <scsi/sg.h>
42 43
43#include "scsi_priv.h" 44#include "scsi_priv.h"
@@ -525,6 +526,9 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
525 if (sshdr.asc == 0x10) /* DIF */ 526 if (sshdr.asc == 0x10) /* DIF */
526 return SUCCESS; 527 return SUCCESS;
527 528
529 if (sshdr.asc == 0x44 && sdev->sdev_bflags & BLIST_RETRY_ITF)
530 return ADD_TO_MLQUEUE;
531
528 return NEEDS_RETRY; 532 return NEEDS_RETRY;
529 case NOT_READY: 533 case NOT_READY:
530 case UNIT_ATTENTION: 534 case UNIT_ATTENTION:
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 3434e143feff..91a327edf1fa 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -63,8 +63,10 @@
63#define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30)) 63#define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30))
64/* Use UNMAP limit for WRITE SAME */ 64/* Use UNMAP limit for WRITE SAME */
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 */
67#define BLIST_RETRY_ITF ((__force blist_flags_t)(1ULL << 32))
66 68
67#define __BLIST_LAST_USED BLIST_UNMAP_LIMIT_WS 69#define __BLIST_LAST_USED BLIST_RETRY_ITF
68 70
69#define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ 71#define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \
70 (__force blist_flags_t) \ 72 (__force blist_flags_t) \