From patchwork Tue Mar 12 18:11:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 10849757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 912986C2 for ; Tue, 12 Mar 2019 18:11:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B91629842 for ; Tue, 12 Mar 2019 18:11:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F6A329845; Tue, 12 Mar 2019 18:11:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 174382984D for ; Tue, 12 Mar 2019 18:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727745AbfCLSLj (ORCPT ); Tue, 12 Mar 2019 14:11:39 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:44452 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727374AbfCLSLj (ORCPT ); Tue, 12 Mar 2019 14:11:39 -0400 X-IronPort-AV: E=Sophos;i="5.58,471,1544511600"; d="scan'208";a="29133378" Received: from unknown (HELO smtp.microsemi.com) ([208.19.100.22]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 12 Mar 2019 11:11:36 -0700 Received: from AVMBX1.microsemi.net (10.100.34.31) by AVMBX2.microsemi.net (10.100.34.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Tue, 12 Mar 2019 11:11:35 -0700 Received: from AVMBX2.microsemi.net (10.100.34.32) by AVMBX1.microsemi.net (10.100.34.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Tue, 12 Mar 2019 11:11:34 -0700 Received: from [127.0.1.1] (10.238.32.34) by avmbx2.microsemi.net (10.100.34.32) with Microsoft SMTP Server id 15.1.1531.3 via Frontend Transport; Tue, 12 Mar 2019 11:11:33 -0700 Subject: [PATCH 1/4] hpsa: check for lv removal From: Don Brace To: , , , , , , , , , , , CC: Date: Tue, 12 Mar 2019 13:11:33 -0500 Message-ID: <155241429348.23182.14805871579897100139.stgit@brunhilda> In-Reply-To: <155241423734.23182.4742066781667397820.stgit@brunhilda> References: <155241423734.23182.4742066781667397820.stgit@brunhilda> User-Agent: StGit/0.19 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP multipath failures normally detected at the frequency of the event thread. - detect LUN failures earlier by checking request completion status Reviewed-by: Bader Ali-saleh Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Prasad Munirathnam Reviewed-by: Kevin Barnett Signed-off-by: Don Brace --- drivers/scsi/hpsa.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index f044e7d10d63..f311ab259a02 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2647,9 +2647,20 @@ static void complete_scsi_command(struct CommandList *cp) decode_sense_data(ei->SenseInfo, sense_data_size, &sense_key, &asc, &ascq); if (ei->ScsiStatus == SAM_STAT_CHECK_CONDITION) { - if (sense_key == ABORTED_COMMAND) { + switch (sense_key) { + case ABORTED_COMMAND: cmd->result |= DID_SOFT_ERROR << 16; break; + case UNIT_ATTENTION: + if (asc == 0x3F && ascq == 0x0E) + h->drv_req_rescan = 1; + break; + case ILLEGAL_REQUEST: + if (asc == 0x25 && ascq == 0x00) { + dev->removed = 1; + cmd->result = DID_NO_CONNECT << 16; + } + break; } break; }