From patchwork Wed Dec 27 04:34:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghava Aditya Renukunta X-Patchwork-Id: 10133425 Return-Path: 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 CC0D56037D for ; Wed, 27 Dec 2017 04:35:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3C282DA63 for ; Wed, 27 Dec 2017 04:35:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A876F2DAA2; Wed, 27 Dec 2017 04:35:44 +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 37FCA2DA63 for ; Wed, 27 Dec 2017 04:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877AbdL0Efm (ORCPT ); Tue, 26 Dec 2017 23:35:42 -0500 Received: from mail-bl2nam02on0069.outbound.protection.outlook.com ([104.47.38.69]:52320 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751457AbdL0EfY (ORCPT ); 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=3lAc6+Q5Dv552gAOlnNSirvBiVbqX6i9xtAbaudeRcw=; b=kz/8mYJSO8d2Xzb9RbObbtlCkuE5JmbwqMZ2PM8uUVMAxCxeNwLeJmWrZCZL+qAO4oHOgwa27+KcpgScRlh6DHyJ9W0whPX1x3uybpwVlPs1YS9Eip9ckuicTWl6BxZs/ZvIOm2eBHIIWKmvhrZQUGBknymjPjXRWGaT/tBkfbw= Received: from MWHPR0201CA0048.namprd02.prod.outlook.com (10.167.160.25) by BLUPR0201MB1826.namprd02.prod.outlook.com (10.162.239.24) 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:21 +0000 Received: from BL2FFO11FD050.protection.gbl (2a01:111:f400:7c09::151) by MWHPR0201CA0048.outlook.office365.com (2603:10b6:301:73::25) 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:21 +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 BL2FFO11FD050.mail.protection.outlook.com (10.173.161.212) 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:02 +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 To: , , CC: , , , "Guilherme G . Piccoli" , Bart Van Assche Subject: [PATCH v2 27/30] scsi: aacraid: Skip schedule rescan in case of kdump Date: Tue, 26 Dec 2017 20:34:48 -0800 Message-ID: <20171227043451.27813-28-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 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)(39850400004)(396003)(2980300002)(438002)(199004)(189003)(110136005)(47776003)(53936002)(316002)(16586007)(2906002)(356003)(72206003)(97736004)(81156014)(8676002)(8936002)(51416003)(68736007)(59450400001)(76176011)(50226002)(2201001)(54906003)(106002)(104016004)(81166006)(77096006)(2950100002)(478600001)(106466001)(48376002)(575784001)(86362001)(36756003)(6666003)(50466002)(1076002)(57986006)(76506005)(5660300001)(305945005)(69596002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0201MB1826; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD050; 1:kJ4MOsu5NtcZ3Cqdw5X4vDvz+uStZlZwKIBwq9zb1+7vadWGsqvZ8V2nJokTGkF/FPVuMC9110YXYhq4QD5E4HWxWnUZGspiPuWOvTdbawFiQl04R26JLtUdMasroS3a X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0cc6ccc3-4945-40a3-8c92-08d54ce33213 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:BLUPR0201MB1826; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1826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rTqbC0BFzpl5T2BaHEbils2kdba4BwuNBO9R9/gu64S+lnkS7cFGIEPWDGKQwoal+lv2YRfwCHmFUPxctSFm/3Phv1T3PQtD5uVpAuK/Fq3rbQca2Q2N2EzUJY9Ak0ILQFS0y/7vLhPZXsmtE5Hjhovbx3/sz13GfjVhN+JmlBRrL6Anpmjt/MLHANIxxk6xJMahGDmc576PPVcLA58OUyhRO3IzoobuZuUlsrhdAt/Fvndvr8gDO1LPAQKFqNs9kjjuRnuwVVPXUZA4jOOlURwM1sua2kbZ3HXAgnf/JTC8x4r5yjntoPhNgjAEdY+e9qJqxP2sItIu09wyiVghsHjR0cVurkvs7ykU3FWKcN7oi8q6XxGMubhxfK3VUx2hAADh/0QpNVWXSmFn2kKcC50mlf2zFm3n7AzkoDTJ2HB8I9PiLDxB9dk+OvyBY+C4CXIsM6UFgIipAIYiQUOogAekoT08HnL2BYtEjNzyry8uBleXUczQXeSv4Z3kxxP7Wx19KgCVioiVDGOLm4kSVPBXPt9Si3Vhs52HB7RsJL4RNRnszoZNE8KjN8gkiWwQh5SS2jxa0qjSY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93004095)(3231023)(944501075)(6055026)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:BLUPR0201MB1826; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR0201MB1826; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0201MB1826; 4:p/7xzKtFECi6qqigbhfbhM73K8vFhWVNiuOuzCL82Rxm6njlTDPMdG+FQY448QeqFcaDQet4mlOIzC6M84HlEVWY5h3ZDkDJGEfaGfIpcmqOn1YZErfAxJrCyM595Z1PMOEgpGqsOF5AZtKKvsT4wtRHN8RTJubHXUhuwokygjP0Kc1IcHj9vfvlpyx2lL9O7EeV9SqCHWUVCEqKp+K9hjgrN5TTj/rme+eTmnZYaTgFe6vwsWTddHk3G4CYh+ZPv3MmuX+ZUU06EpGVJ/zOj5TWD8yLk4nIrgQn4JvxIh7fzosW+PRXiKe6EFUwWKJ7 X-Forefront-PRVS: 0534947130 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0201MB1826; 23:Vt9bYjhkhDHf1m/7IpNwmfD5Ax6QgqIp34mGDXR?= =?us-ascii?Q?w89n2BKSuN5yILh3sh7ABDNKMnpSd2MlA3CJAHSwT348fUJy2al3xY+TBlkV?= =?us-ascii?Q?uoGMUTtDPrbiZNGjbSRvDEoSvAEQQSGEf4yeWu4esATJlBzbg9XlD9ujObkY?= =?us-ascii?Q?3RyZZ/WlHimM9Vabpi51nmWI4sU/yrsS2iIYc8qIChYvCiXb39WIYuxRvxoO?= =?us-ascii?Q?tNQdR7gdD1D5VtITZNpPDwPwNG0jtSYGnyJf8hAifNrLIUpkD3bapzlE6gw2?= =?us-ascii?Q?rA20BM/8Rzr4uswKdfElHRwFLWinBSrBSZ9nKcLZrq7sPMBgggzfBDiynD/9?= =?us-ascii?Q?KtI0s86i//I5TezoyXhfDZp3Ip7Iw2eFxfcryP493wOeVEYiOjw4mpWzC0JN?= =?us-ascii?Q?4AcsodKdgVZPmjnxMYAWFck43N8vRgCzbOKcmgQsbUCAu7TwjMAM+njQPjlE?= =?us-ascii?Q?VUmnVfIq7QQ8SbxXTYK4A2IGao20rnGD+nfqDihn6NuQRjlF/lNp9EhRx6ko?= =?us-ascii?Q?JTrSljNJrtaEZ5pP4F9Txh+FL88Ld/i66a7YiOmUV/RkzNtNWshRYJSzviSC?= =?us-ascii?Q?2AtaE4ZciCspoZoFH88MGIePmvgLpRu+ySZ297puWMogd7gGTQEEuMciyuo1?= =?us-ascii?Q?PTZjkCaToZrBboS0fect3IKiCvVWL3rlQ05AnY3SvTW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yfUUt+DEyrYkzp3s0HFxEn3DUwZS7KiGTXTfuanXPJP7oNeIANFPZ57/uERJmK96/3FqcFrB5tRysTM=; 24:bucL1EEQX8gteuheWFVF0liVrPDEFK38fAJAB3Lnl8EIPqCnxwSn+yIdRaRGj47yJ3ndmIrw+52x9zbsRrVYgV7V+CqgrNzlvW8azyqGbkI=; 7:3pP9jEV+t3t19puO5jmWXGMO7K8d6Tu3OH3iQ9eR5pj4YIc3gdGRLdBaEblw+jngE10vEPqxk2Hq5P2Bnskbt9OUB0i9SMWzGNvH0jGt6Fps2+7A/a9BM15hKta8VUj4bROdsfIAQVDb0FT6XQxm0oMXcaJ3HQEgApQrA2VVco+fA0tF7hSmwU+tOa4X6hkkE47y6FRPcBX+1wwwTbQW+wDgzrN94xj2o2JYD7RPSv7rtKY8YtasNYIN3JDVgAdf SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 04:35:02.0946 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0cc6ccc3-4945-40a3-8c92-08d54ce33213 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: BLUPR0201MB1826 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 There is a chance of the driver to be stuck in kdump if drives start acting up in kdump discovery process and the kernel decides to send eh resets, which would prompt rescan to be scheduled. Do not perform a rescan in kdump context, since we do not expect a hotplug event during kdump and all the devices are going to go away anyway. Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: None drivers/scsi/aacraid/commsup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 706aba0..f0c3e7d 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -1675,7 +1676,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) * Issue bus rescan to catch any configuration that might have * occurred */ - if (!retval) { + if (!retval && !is_kdump_kernel()) { dev_info(&aac->pdev->dev, "Scheduling bus rescan\n"); aac_schedule_safw_scan_worker(aac); }