From patchwork Thu Dec 21 17:34:18 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: 10128143 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 7C52260318 for ; Thu, 21 Dec 2017 17:35:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B03E29CE3 for ; Thu, 21 Dec 2017 17:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FCD229D38; Thu, 21 Dec 2017 17:35:49 +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 F148329D37 for ; Thu, 21 Dec 2017 17:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755160AbdLURfr (ORCPT ); Thu, 21 Dec 2017 12:35:47 -0500 Received: from mail-sn1nam02on0070.outbound.protection.outlook.com ([104.47.36.70]:57584 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754670AbdLURfB (ORCPT ); Thu, 21 Dec 2017 12:35:01 -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=CAg8b0UHN1+fHMJ+FP0vGhccLSy8svhITT0t5dfvS7Q=; b=DL35JaoDB8LUZR4G4pDNNmCkquMZ7cfzLYnVDxDtfau+6uyaLR2oiAFRbChZhGRcntQhmoLcUW0Ma436EuhZkJBFppDHmMXMJrhawOv6F/gJDQfqwy4s8dZkLEL6crPg6rVr8crv/aYDFlD0WoHExRo/SIxPOiqf+9iMp7mKAas= Received: from MWHPR0201CA0061.namprd02.prod.outlook.com (10.167.160.38) by BY2PR0201MB1832.namprd02.prod.outlook.com (10.163.75.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Thu, 21 Dec 2017 17:34:54 +0000 Received: from BN1BFFO11FD012.protection.gbl (2a01:111:f400:7c10::1:183) by MWHPR0201CA0061.outlook.office365.com (2603:10b6:301:73::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Thu, 21 Dec 2017 17:34:53 +0000 Authentication-Results: spf=pass (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none; linux.vnet.ibm.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 BN1BFFO11FD012.mail.protection.outlook.com (10.58.144.75) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.302.6 via Frontend Transport; Thu, 21 Dec 2017 17:34:39 +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; Thu, 21 Dec 2017 09:34:29 -0800 From: Raghava Aditya Renukunta To: , , CC: , , , "Guilherme G . Piccoli" Subject: [PATCH 27/29] scsi: aacraid: Skip schedule rescan in case of kdump Date: Thu, 21 Dec 2017 09:34:18 -0800 Message-ID: <20171221173420.8213-28-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171221173420.8213-1-RaghavaAditya.Renukunta@microsemi.com> References: <20171221173420.8213-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)(376002)(346002)(396003)(39860400002)(39380400002)(2980300002)(438002)(189003)(199004)(50226002)(8676002)(86362001)(305945005)(48376002)(50466002)(81156014)(81166006)(97736004)(2950100002)(77096006)(6666003)(356003)(4326008)(8936002)(53936002)(76176011)(76506005)(68736007)(51416003)(57986006)(316002)(69596002)(54906003)(16586007)(110136005)(5660300001)(106002)(47776003)(2201001)(59450400001)(1076002)(2906002)(106466001)(72206003)(478600001)(104016004)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1832; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD012; 1:PDCTW7kXZHHeVBXjiZucSCQssWlhfzYjBnTe/3a98FDoQhHRpyXtw8WUKQ+FolAA4/atRwd0wVL+T5peWNo0taaOOiCIEhlEqxX43qRXD8CzvlaliB/JVRXd3x9q4eRN X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0684e69d-4e04-4ada-b6c7-08d548991cf4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4608076)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:BY2PR0201MB1832; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1832; 3:LsThCe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N76f4xCiB5J13fBLkYU0bw1KtHOuMOTgJgOgJJqB21QvmUpt9hqu5LH1o5a0vhkWFd1qld4dTCWWCa6iLALRwr06igmw9XLQfPSYZ7Xdt7ppaUV5punkcH6xItRVaXfFs+ddm4yXu0BFs/+D7YpQ+CENVgBbaNr2qz8LmJFQElm8drx70Gh0yVm9FBMWMJOhMPdJullt+74/qDO+dKsGc2UtevpRhkqh0A1ZGmb8VDHHnaR+3BJmFs4f2TgR5wbT0zOUhSi6o0pl7JmqyVn0K4Q7kARXwnjG1d9SbaURR+n8+Eb3jiNaTmuVekmCOK36TKSUN52x8Ua4KqZXnsmsU1MMwK/WW3NbMS5GFNz0J+Zw5xdp7pWWdQrja/NkUmObSecwzTYinGRWTo8BqcxKyJzxHseyzkgRJiMyhWrEQCYe/VH4si/+7MBbCKqawoxfq+aNuVUSbaVdUy8TD1yGwEB8XrrYdceqmOVa/Azj1WVQ091J/qOtB7c1yiDg7lufT1rRhic+fZBKnap/gaGY7SrGtbdiMKQvgb5qpBVfcSnK86C9k28LG9Ir5U+CQ= 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)(3002001)(93006095)(93004095)(10201501046)(3231023)(6055026)(6041268)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:BY2PR0201MB1832; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BY2PR0201MB1832; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1832; 4:Z56zTHLSecZCf9b8Leo5JN0w7mzb2koa6i1VLanMPsbls0MlB3lII/i2iHRUeY29GlOOoiCtkwqUcZ3TqqFGMpFL47QUC2gSPu2y0vqGP7CkGPDpuX2/TZxeRdTN5pjRcIWLhs1I9WsO3F7ttl2RFfJLPdMU1Qw/Q5QwMO7eFIy1TuKXjOaxopVQSHQgqXW5LTDrJSy/0Dz4e0qC8KREZPXIXaqtywr2hayKz51ZFg/iP3KjP6jMCF5/uB0Wxmw9bRz1Wqgq9cfAu+4FE66kx9Q3h/C226xzqOUzSPI1uM4bT8NvjLpNyySb35PaXJyW X-Forefront-PRVS: 0528942FD8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0201MB1832; 23:+z5dhDGV3jLlm83pKsoHW5UF5jA6TAu1hPYelQJ?= =?us-ascii?Q?TT9gd+XyfMz/WRL3ow+4Y8fU5efimgcMH3k9CHiYDlwEwxLJHx9nbAkv4imO?= =?us-ascii?Q?NW/3nhuyqzOyt7ryW1Di9+VuxnQSHUa1t709GmpEF+nFFVAYojmkJI/y+QE1?= =?us-ascii?Q?sHxIDi2xjO6DDx/qy0asPjN95Z8wkwxpUas6o7mUUUrhW3vmnytgn25hABwu?= =?us-ascii?Q?PjDHKDPqm/cyA2h3J4E4ifa08+EWcQRND3TiZqimTWulVtd2se1hR0H0fMg3?= =?us-ascii?Q?k79v4fAyQDLgQIuJo2sS/KR+Z8GgTEVo8k1Fd2Y902TM76ET/s8jpHWyPOmu?= =?us-ascii?Q?bXMBJR84m47gxZ1BBMrA9Sw3gDr4i8YzRYFuFv3wdBRCLYCQieCO771OQA5w?= =?us-ascii?Q?YKl3m5pr7ZALbH6NfNIwWz1F3oUBdUqYBIbwHey3CJwh2p9p04Z4sx4yvOLv?= =?us-ascii?Q?LKdeT2vgjPHoatMdf7zHrNs2Uf27qX5UUeosqiHT35t7gftTxArfSJzQTS/B?= =?us-ascii?Q?E/A0ffNvO17aNyPvO1Y6owcwzyPdVx6XPT3CNKZ2iL79LfbeipOhYs8LyXaP?= =?us-ascii?Q?voxI3MzR05324WNMjXEWv1qhC8cYxCACxe7oQEyp7M33KA0z46MzVysf1COU?= =?us-ascii?Q?EedGfTnSWbT/njfimd1uUNs13V0dxcRXMnApUHBfZygHcn9kxOCkII3i9mKg?= =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iJhL0dLvOXfxyT6p5ag3b7l8TvVL35if8Uo58DsB7g=; 24:PUsz7gAXSOhSA2legpb1WRa2iUQkDlso4kIGUzggPoT6MCdqhZRQagBDchR4sB2fVFcEiJoFDWpF6WxEyKktiKuC0cetYfJlwDBX9o0ksXs=; 7:7/dD37s1WzJ83LPZSna45JToHMN0q4MeKaYJepNdOxVt0DyTETy4Mdc+PygzEvghic991d1I7IqZOFAKvH5/M0cViWzf/u0HfaP4OIqf6rtIx1gU5pmk6qKRMgkbvxnDYs1Y7pbKbZVF3Dn8necGrfFiHygut8VQeeZfDGh5wVDw0ThulIl/52hqm+MMF3LcnEJvTL3cqDJ2GX0FAEYIa0z1W0G0TNHGlC+VpUkC7G0wlK+BjMJ7ZTLHMiWt6kPi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2017 17:34:39.2356 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0684e69d-4e04-4ada-b6c7-08d548991cf4 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: BY2PR0201MB1832 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 being 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 --- 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 adebf2e..6f5dfc9 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); }