Message ID | 20171227043451.27813-27-RaghavaAditya.Renukunta@microsemi.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB3666037D for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 27 Dec 2017 04:35:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC6A42DA7F for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 27 Dec 2017 04:35:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF3A02DA63; Wed, 27 Dec 2017 04:35: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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 44F532DA63 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 27 Dec 2017 04:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbdL0Efo (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Tue, 26 Dec 2017 23:35:44 -0500 Received: from mail-dm3nam03on0046.outbound.protection.outlook.com ([104.47.41.46]:7296 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751856AbdL0EfY (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Tue, 26 Dec 2017 23:35:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mscc365.onmicrosoft.com; s=selector1-microsemi-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=X7hBmKZAlUhoRsjebLX3v+NIKuIsjMFDC0NSrU1iBtc=; b=NB5JYdAGql88ETM7ztkWE3sFotrYSuXUeXRJaX46ELH58pPdCEIjXGoaeOSqSSG+Xyl8lxtv388rypfgbbZ2tcuDOPMCipll5ItLhoMGXPVEd9e3S50+EKlw6ajy33riy3QwsrVoXlN4vbXu5V3wsylJcMbP29hp9UWP5tx8oV8= Received: from CY4PR02CA0006.namprd02.prod.outlook.com (10.169.188.16) by SN1PR0201MB1839.namprd02.prod.outlook.com (10.162.228.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Wed, 27 Dec 2017 04:35:20 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::140) by CY4PR02CA0006.outlook.office365.com (2603:10b6:903:18::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.366.8 via Frontend Transport; Wed, 27 Dec 2017 04:35:20 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.100.21 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.21; helo=avsrvexchhts1.microsemi.net; Received: from avsrvexchhts1.microsemi.net (208.19.100.21) by BL2FFO11FD049.mail.protection.outlook.com (10.173.161.211) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.345.12 via Frontend Transport; Wed, 27 Dec 2017 04:35:00 +0000 Received: from localhost (10.181.72.13) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 26 Dec 2017 20:35:01 -0800 From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org> CC: <Scott.Benesh@microsemi.com>, <tom.white@microsemi.com>, <aacraid@microsemi.com>, "Guilherme G . Piccoli" <gpiccoli@linux.vnet.ibm.com>, Bart Van Assche <Bart.VanAssche@wdc.com> Subject: [PATCH v2 26/30] scsi: aacraid: Fix hang while scanning in eh recovery Date: Tue, 26 Dec 2017 20:34:47 -0800 Message-ID: <20171227043451.27813-27-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171227043451.27813-1-RaghavaAditya.Renukunta@microsemi.com> References: <20171227043451.27813-1-RaghavaAditya.Renukunta@microsemi.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.100.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(376002)(346002)(39860400002)(396003)(2980300002)(438002)(189003)(199004)(97736004)(53936002)(47776003)(356003)(86362001)(6666003)(69596002)(2950100002)(316002)(77096006)(1076002)(51416003)(54906003)(76176011)(8676002)(106002)(5660300001)(106466001)(2906002)(8936002)(305945005)(110136005)(59450400001)(81156014)(81166006)(68736007)(76506005)(104016004)(50226002)(57986006)(4326008)(2201001)(50466002)(16586007)(72206003)(48376002)(478600001)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0201MB1839; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD049; 1:/Q46v1/OUtHEP2cYwR5yHMrImE5E9oy2rFzwA8hcck5DiQEhoAjHBrVDz/M4oM3xfeUffYM7KtMzf2obPXyaeRL0Pu8qpd63198xBDje93C1cQ/UeeOCFiGE0FcUdc44 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 973d1216-785f-44ba-4b2e-08d54ce33162 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:SN1PR0201MB1839; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1839; 3:Q/gJomxN6+RiBukWDLVRO0FhfPt+T29KXVsxReuY6C2bWj9gyXmZRzJcOHXdD8OFVsM02QLTwooW8sT2Klr0OZyyVBs0Ghg/cYESDilZ7Tgk1u910BI9gG1Q2Fb8D51pis+r4aw4+qZmkLM3v0mMPI7eR8SezW7fU1DVKGf9QTMui9ulBulmmKwHvc3mdvZLsa5VyxtfIocJ1v0cmOkhZb9YZQQ1tO/MTgXbqaZZ3nC46AvUZ6xgn53/MCCs44jfmchLdeZod8OkLXzx5sF5DBKnYBGrwfqOAk8s7y5+GMvTy3KKkqv/+vZlmfaC5OThM6KO/5KiIYE1SzgQbzS9kZ1ys4ddChFcF/bduUQLzcs=; 25:qLM5js0Tx47CPgltuHv8myKYenHfnKLv7YsLg0y4vVBgLAadXvJCxC/uteyYNjdHclYjS2kfS5rjMUkWIj2XcrzVnchrzV6+F+jTCbNM72NCc/WFfeR5p/ZD6u10TlSLkP3SdV6G5QBDhOwPHZBQkXUUEOhz0AgXqUIc77VljlzD4Tot0LX9YmGaxY55eNbth0Vvjt1J/8wpzRpJVzfQN+nzgRNnqFDLAESt6wMDg3i2CQV91l/b9pakKz5wZY1U3KpRMISCDVL6L5tMIHnbXD2avGAg9Uxo3yHK6Mq6MhVnPtYkBO97aAw05n89sVQG3lpqvDL2K1TgCiimb1I3vQ== X-MS-TrafficTypeDiagnostic: SN1PR0201MB1839: X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1839; 31:luUvWeP6X5Uyv2wMP+hGJ54CiUzVbw82Pw49hucIG6+0QkRjtECARvdMewaQcSxixf3BtSsr5YZVoel68nyT5oOd2CmtOBp84hs+/OcuYbNvLvMIRba0xVgvWTwuGiR4+tXykwqTLXaibwZ6bs/D4Y2fIohbOZYUPil9JFC7ECG8aAICp1sJQ/7wSmuNzf/5eCC1iHIffmosA/QgmtXXnDUnHyoE60I6Mdr3bjuXl/4=; 20:wgfS/VmkR+AEm65Vv6VkQBRrZ9rZtpSKABDwngZ0KFEnZBlcsY3oRHDCeqXt5BL/VxmMuqGLrgv/OTKaSYMyuFN7oWlRk5RAedcp3U3oopJR4/tF8cDroDWCLolc07bzTZkf+sVg+OUepnjsL+cOQTeSrsqWTMJMZqzhF1Oy+TaBRSeLBVL/h+ARTqC0k9psusuxb2FxUsl8coSFtkucM+rOuHwnChGD5w0mgP2Ag73GOqRY7AXAPpllB89lkI1cj7ePZQsr9l4MJsY5OmPMhE6xrfNupdBz3miEteKuUqh3FAK2gudBwiqZmBdLnO1zIeSTxOkKDsk8jddySxKBdSG5AFShXcJLGEP9CH1Xpy7+DcDD5MSk042IN0naHDa5lawFa2iZlq5vFXA+OcwXKcQe1jQTS8lHqOMPbfbHtdNcVW7kpOpUsCrsBdi/c2dQPtVWsOLQAA0JmY+xbq1Aq2Uuq7wE3V/0VZaY5l2v3vzIysoL78ores6C7tdXHL6EjIi/BM7rjfCHMTM4FSpCXS4amZPck1v00NWV6tXKFQdpgRZ32xTsmt12WVaplp/gw1hj6ubAJ5WcvBzgvugK5ijFfTjWNHMwb6SfnE/3Pn0= X-Microsoft-Antispam-PRVS: <SN1PR0201MB1839D0E308B8C524856F4CC2F0070@SN1PR0201MB1839.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041268)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:SN1PR0201MB1839; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:SN1PR0201MB1839; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1839; 4:MTbTwtX/BboqmVZSUwm9tffwQ1hl3Pg5euxMdIgtThjjqqyeO2trs6qe2tFLFnT6BWWNj8uZ1fKFfzcGGo+XUkrdasSFHA+JROlh00poEbFxjrLOpAVl1FzR7I63jHBGZJ21B95GDHJRO1Ia4fds8+ntM2yOrbfRiR0dXHgmAn4NI8wbg5d6c9jRJkMGxxQinDOko00rolq4t3nUh3A0dNNtVIYXFX9Bnaxs4cVHMhO70u33a/HW2+atKESBZdqrKjRjO+Qc2roJ3L5Lu+P9PtybCMdISb0e07Jh6kd8eAT6RegQyS84DhmrEUxrkBz3 X-Forefront-PRVS: 0534947130 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0201MB1839; 23:V3qHcznGWcv4/BHrhNw325guJ3MVf2rKZgJwaVb?= =?us-ascii?Q?wViqjiIzH2glmrsTJGfdwc/P+/MRBO+a+6rbb8LAHyApVDY2Yy1jRK97umd1?= =?us-ascii?Q?iM74ifSaQSFYB11mrXdTEgkzUyDAVKgbFiIS5cLnPeByXYt1Ti1BksZ8cLdW?= =?us-ascii?Q?aqsaW3Lb4WHABAS5CposdSMUMX2zSU8ioQ4RIbdwlRrDaPpwFd6Fke2qk1X3?= =?us-ascii?Q?AeaQTHgeoM63gw0m+TxFj/6KDa5llI+3H8LOnspn1kBh41y58S6bz95QKyyJ?= =?us-ascii?Q?dhQg50VijTmS4Xt52xQTYv0osJ6g5NP1Nwuye6azT07JzeVlzrjMCxJtuQSI?= =?us-ascii?Q?Zx6RkS1vmw5S5b94fA4NtAL7+ixlStqeLhP4ZqJUBH5QlYk36bZw6G9nwZUS?= =?us-ascii?Q?XB+0XIRJUOODwTgUlwSqesfIi+Sb5uY6bn8sL3EI7DKKW65t7th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TmbvFOpInCAnQoTqqHMvPZpY1v2p6cioS42/cvbLyrT3AyKAngFhLvKqmX4LH7Menh1Q6oZ0qvRo6JQH3QjmSGKtS8SNaLi++I0YFthwuTTWfRmoh8WJGPgFQFHpUynOm8G/vgyKpHcGALZ/BOFtkFM7AArZ6h0RMRPU/4/tJl4XCZ+pcw=; 5:jasjmcMcbraqW+fOFI7e5ZIxzqezx4wD0RwoXLRnr7y16i65++PvGalJmjPQUvZgyOQ9aD599Vwxo7ajjaU7bcLY9CxBPiGIhU8Hs0pOROphVqlv6fmhqV68pTwy49pT4VltathT8cBMemKvKenLdGMwHuVTx6SvqBHQn5VydMw=; 24:TKSoihB3kZHo0U+Aekaor5NxKGRjqKIQ7t6LwhiRyKhx5fII9AOK2UvSGIG+acbC3oTUFxenm3aBAzBbuCQda0c/MdqIDzpwcNtNy/SUpTg=; 7:fxW7p9YbHZ1WnmOzJWQ8H9tflPWasBmWt2hrke3rhkiffLlPj/InmHdaKWqA6Ne2JdybJMdp1YUKWpbvDpQKj1aBnOTXl1eBQLWVnuBFBpAPJDTRlvAzbf9nbJjgGk7w0CJqOpWt+YRDOCbx+f/X6KLACEqYVTYn+aEhzKMc8I/CwC6ef2lW5r+NDFfqJ8THPCJvNfTKRQnWBRT7eVIPWoDnEe2SlDy71xn6/PNwXQ0odPjdAhVNfvXe1d+LusNi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 04:35:00.9329 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 973d1216-785f-44ba-4b2e-08d54ce33162 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad; Ip=[208.19.100.21]; Helo=[avsrvexchhts1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0201MB1839 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 54078bf..4cefc47 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -41,6 +41,7 @@ #include <linux/interrupt.h> #include <linux/pci.h> +#include <scsi/scsi_host.h> /*------------------------------------------------------------------------------ * D E F I N E S @@ -2655,6 +2656,9 @@ static inline void aac_safw_rescan_worker(struct work_struct *work) struct aac_dev *dev = container_of(to_delayed_work(work), struct aac_dev, safw_rescan_work); + wait_event(dev->scsi_host_ptr->host_wait, + !scsi_host_in_recovery(dev->scsi_host_ptr)); + aac_scan_host(dev, AAC_RESCAN); } diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index d562053..706aba0 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1671,6 +1671,15 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) aac->in_reset = 0; scsi_unblock_requests(host); + /* + * Issue bus rescan to catch any configuration that might have + * occurred + */ + if (!retval) { + dev_info(&aac->pdev->dev, "Scheduling bus rescan\n"); + aac_schedule_safw_scan_worker(aac); + } + if (jafo) { spin_lock_irq(host->host_lock); }
Add back the ability to scan for hotplug changes while eh was in progress. Schedule a rescan for a later time in the eh recovery code and wait for eh to complete in the rescan worker. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> --- Changes in V2: None drivers/scsi/aacraid/aacraid.h | 4 ++++ drivers/scsi/aacraid/commsup.c | 9 +++++++++ 2 files changed, 13 insertions(+)