Received: by 10.192.165.156 with SMTP id m28csp621016imm; Tue, 17 Apr 2018 16:39:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx49gjJLW12EAYGag8NCxZXDtJ6v9nxO+oBeHIsOw9xu7T8eh4+9uGiT72YsXRtdCb6u3duZj X-Received: by 10.101.68.205 with SMTP id g13mr3208593pgs.387.1524008362406; Tue, 17 Apr 2018 16:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524008362; cv=none; d=google.com; s=arc-20160816; b=acevNPxCPR5xOHNK0B5Kj1b3lV7oHvHbDQcEIr0lkhm4sxd2/9y55+dxjTCNtYKJ7u r44Sf9LWGHl52qGKgOoxE3TRSc5dJQwgoITBI7+gHUrfFjU+2o123rQsY5iyLDy0CrEd 4mvSTXTb6VJdDdKUAm4km8w99Sczq+x9hZnqsyq6pp+mh139JbkZwVDXED9bmvwWh61L b7JE6k874ybW0jez4S812QQ7mtky5aXscNvFew0l/i8Y0b12h0m6HO08mcdzFmNBCVYd +3IAoJaRy+0usaFw74klndI+qMnwHYJ5hqdvQSrsrSjJW1Yv8HBri0OTQ5PiGD72FhDv 6qyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=5+cBouRRNf+XcSUoMn3KbjZgO/a8RpCtbAw3KSHVuj4=; b=JwX4NQRlyIiIs5yupZoo5QJbjgD+1s0AqAv1P1gNWDNSy6oNEe08vWFdu362DC0QuJ NnMebLOuH5xTvJYnQgtlqE9/6Vpn91xbmEdV0fzXmWs2omRNtzHTECPO22hLz0oFMRsB F0PshnnfiJkDy9c3Inkw3Wk8ACLgXuenhh7nzjyZb54jy2LyHPnrCqcsdySVR6isfQJC wRN83yJp5WixfHdlLhhL4IWtPCaWdwSs1VLhWtZNT7eGjGafY78P2mBln+isrjVNTvu2 O8eklioHsQ2DSEZgLO+I3ctmJpdy+i93FtBfWib4Q1lyT+6SnlbSf+kmI/02EvsQVGmW +0aA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k195si1416722pgc.493.2018.04.17.16.39.08; Tue, 17 Apr 2018 16:39:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753364AbeDQXhV (ORCPT + 99 others); Tue, 17 Apr 2018 19:37:21 -0400 Received: from victor.provo.novell.com ([137.65.250.26]:57832 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752728AbeDQXhH (ORCPT ); Tue, 17 Apr 2018 19:37:07 -0400 Received: from apollon.suse.de.de (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by prv3-mh.provo.novell.com with ESMTP (TLS encrypted); Tue, 17 Apr 2018 17:36:50 -0600 From: Martin Wilck To: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Hannes Reinecke , James Bottomley , Xose Vazquez Perez , Bart Van Assche , Christoph Hellwig , Linus Torvalds , Janusz Dziemidowicz , James Bottomley , Kurt Garloff Subject: [PATCH v3 5/6] scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix Date: Wed, 18 Apr 2018 01:35:10 +0200 Message-Id: <20180417233511.6573-6-mwilck@suse.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180417233511.6573-1-mwilck@suse.com> References: <20180417233511.6573-1-mwilck@suse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/scsi/scsi_devinfo.c | 3 ++- drivers/scsi/scsi_error.c | 4 ++++ include/scsi/scsi_devinfo.h | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index c05843a..f7b94c1 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -161,7 +161,8 @@ static struct { {"DGC", "RAID", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, storage on LUN 0 */ {"DGC", "DISK", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, no storage on LUN 0 */ {"EMC", "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, - {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_REPORTLUN2}, + {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | + BLIST_REPORTLUN2 | BLIST_RETRY_ITF}, {"EMULEX", "MD21/S2 ESDI", NULL, BLIST_SINGLELUN}, {"easyRAID", "16P", NULL, BLIST_NOREPORTLUN}, {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN}, diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index ac3b1c3..1dee91f 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include "scsi_priv.h" @@ -524,6 +525,9 @@ int scsi_check_sense(struct scsi_cmnd *scmd) if (sshdr.asc == 0x10) /* DIF */ return SUCCESS; + if (sshdr.asc == 0x44 && sdev->sdev_bflags & BLIST_RETRY_ITF) + return ADD_TO_MLQUEUE; + return NEEDS_RETRY; case NOT_READY: case UNIT_ATTENTION: diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index 3434e14..91a327e 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h @@ -63,8 +63,10 @@ #define BLIST_MAX_1024 ((__force blist_flags_t)(1ULL << 30)) /* Use UNMAP limit for WRITE SAME */ #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)) -#define __BLIST_LAST_USED BLIST_UNMAP_LIMIT_WS +#define __BLIST_LAST_USED BLIST_RETRY_ITF #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \ (__force blist_flags_t) \ -- 2.16.1