Received: by 10.192.165.156 with SMTP id m28csp621459imm; Tue, 17 Apr 2018 16:40:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+kdXm9wi1vTrtjr+d2Kym+Ck7BA59ge+g9epNq+SHsKloSAdqya2DGMQggbm9BYDmgnXj7 X-Received: by 2002:a17:902:585e:: with SMTP id f30-v6mr3533603plj.50.1524008403667; Tue, 17 Apr 2018 16:40:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524008403; cv=none; d=google.com; s=arc-20160816; b=o8jGnW2nG+A8F6IPCDQtMCDplfpCbIEyI/AqAbGf7uZGqd1uesaTn/HIGwqkm+7cbN rFbFp2vztM71ROzpSexs4M78cb/vWjV0pqOo5E5UdZ+T11nDiyQbuRNzUoFJ6fXWlTmf wMRDdqwz0qRlraOr+0KO8E0lidpo22xzlC7M0NWuo0FzbbG0Wq0NgZ8d6ytzD9ax9XVb 7pi9zXG5SFe/lZt6xIXu9Q3zQjrmMX6r6EIdBSdLFuiL29zHnrZnzQFsA8eWSZJcJqRA bk7VBmlyKorvs/iVyA12a5MVA1zPHz1ALLCR+zO4g2asYW0GYBodQFiD0ys1sD+I2V6t QPPg== 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=s/fAeyxHDnKxo2a2wtbiazn9J/Ug5Grox0HTHwuFWWs=; b=dMb3ev8y72Z6oMxR4iCsTVVs5pdQJtdyZmXfu4JYkAdNH4eXY++BF+X7fNqNUszTVQ a4A8yA6ZAypd3UmXNb5NBpTLDkqk7m194+Q9A2/xOyIkbzZEC/7i/QSiMr9NchzF5esk 9SXH5PXjixO3boLEYxPA2YYKw+NbtpqkPPUYnIqHQboPKvzAMxmyHeIv8rzrTNd3Mx1V 7m6tnmYq1FwuRczFdm4qRvAjTqHCY7FB9MRw1qlvgzJwgOuu0T072Bu87Wtk9hu70DA+ lxg/v0+9LqBG49BX04BYzET7MsR/c+8vcWcWQr5XhGsjB3fskgfTeB0PbwiQkYbxULg8 +HzA== 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 f1si9191683pgc.495.2018.04.17.16.39.49; Tue, 17 Apr 2018 16:40:03 -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 S1753352AbeDQXhI (ORCPT + 99 others); Tue, 17 Apr 2018 19:37:08 -0400 Received: from prv3-mh.provo.novell.com ([137.65.250.26]:34128 "EHLO prv3-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752727AbeDQXhG (ORCPT ); Tue, 17 Apr 2018 19:37:06 -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:56 -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 , Janusz Dziemidowicz , Linus Torvalds Subject: [PATCH v3 6/6] scsi: devinfo: BLIST_RETRY_ASC_C1 for Fujitsu ETERNUS Date: Wed, 18 Apr 2018 01:35:11 +0200 Message-Id: <20180417233511.6573-7-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 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. Signed-off-by: Martin Wilck --- drivers/scsi/scsi_devinfo.c | 1 + drivers/scsi/scsi_error.c | 3 +++ include/scsi/scsi_devinfo.h | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index f7b94c1..e75a50f 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -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", "0180", BLIST_FORCELUN | BLIST_INQUIRY_36}, {"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN | BLIST_INQUIRY_36}, diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 1dee91f..896b991 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -527,6 +527,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: diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h index 91a327e..3fdb322 100644 --- a/include/scsi/scsi_devinfo.h +++ b/include/scsi/scsi_devinfo.h @@ -65,8 +65,10 @@ #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) \ -- 2.16.1