From patchwork Wed Dec 27 04:34:25 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: 10133387 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 35CF1602BD for ; Wed, 27 Dec 2017 04:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E8D22DA56 for ; Wed, 27 Dec 2017 04:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1376F2DA5E; Wed, 27 Dec 2017 04:35:09 +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 AEE5D2DA56 for ; Wed, 27 Dec 2017 04:35:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751796AbdL0EfG (ORCPT ); Tue, 26 Dec 2017 23:35:06 -0500 Received: from mail-by2nam01on0079.outbound.protection.outlook.com ([104.47.34.79]:10016 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751426AbdL0EfB (ORCPT ); Tue, 26 Dec 2017 23: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=ZBnJ8i/QBdu+fHUt6B8BN8ipEkY+VSLoJHuuFu2Lw44=; b=DeyBltP/+089pb+9tQGHWBNunUCTtb3QsgpjYILKtPeFvXAifFfL2DqgKS0XNVxBhaaD5KjnuzCyT44dIseAqzBwZW8iwNOeqZMiOquFA1ujRFCvQDMv8MJATdAe9iBO1ab0PvF1nGTrU/rM/TeBOQ/DO3bcr98UxjQtrKC92tg= Received: from CY4PR02CA0002.namprd02.prod.outlook.com (2603:10b6:903:18::12) by BN1PR02MB134.namprd02.prod.outlook.com (2a01:111:e400:20::23) 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:34:59 +0000 Received: from BL2FFO11FD049.protection.gbl (2a01:111:f400:7c09::182) by CY4PR02CA0002.outlook.office365.com (2603:10b6:903:18::12) 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:34:59 +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: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; Tue, 26 Dec 2017 20:34:53 -0800 From: Raghava Aditya Renukunta To: , , CC: , , , "Guilherme G . Piccoli" , Bart Van Assche Subject: [PATCH v2 04/30] scsi: aacraid: Do not remove offlined devices Date: Tue, 26 Dec 2017 20:34:25 -0800 Message-ID: <20171227043451.27813-5-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)(39860400002)(396003)(346002)(376002)(2980300002)(438002)(189003)(199004)(106002)(50226002)(104016004)(57986006)(5660300001)(97736004)(2906002)(81156014)(81166006)(53936002)(8676002)(68736007)(2950100002)(47776003)(4326008)(54906003)(110136005)(36756003)(86362001)(2201001)(1076002)(76506005)(16586007)(69596002)(48376002)(106466001)(76176011)(51416003)(6666003)(478600001)(316002)(8936002)(72206003)(77096006)(50466002)(305945005)(356003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR02MB134; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD049; 1:CyHKNcHZ8Ww0KID9xZm6JE3qitjDtq+oww2FLTkpr0V1FURWhprxRFkCf2Eh7kIOJlRJy90x3grzEIcVbv+Aa8Tfu5GldW1Jmw102pSPCN2En/TxZlt9BlkDTzTmChbm X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 14f987a5-912f-459f-ff60-08d54ce324d4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060); SRVR:BN1PR02MB134; X-Microsoft-Exchange-Diagnostics: 1; BN1PR02MB134; 3:4TnL19fVp+MJrshF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a4bf25lN3JZZJY1M68FtfaZmxV6O4r+XRbzy+byinn/UclmT44mhfb9TvSoP0/ELa5pY8dsBy3hKu9qotJwRNCIXr50Dqo200ZuK3MnHRwdCDEMUm3aMsOxpnABgUz0hS6/OJPAVWvikf3/0OIu3NPfFstbhVz0XfsaVXaavtt4LnRulPtjE8fChjdvm0wcOrUThmgv9EB6qi7GnipTUponLmFjo8zBcwc8R0rnFpeF/HKT3qYJwHcWNLI4YsR03Q6rb0TsLPFm6f++xAt3ReyjA0DQ4i/l+R0gUbpHce7XmIx4sx3ewuPZCX12PmE3tyaxWpCKIsr6D2HGAd9+YlWC45od3ekh2ade45vmIoxgh6rPJBpdnItsQsIKIbmKX5HWBaGh06sQO9h07SDnsQVaVtZRYO+KklQBisSUuN88wTb1ixioWfBXqVTEkNQIgtM4/ZAj0MLy52Zi2pqWQMOhChlcYGz93H5RB7ErzYkNiCXPGt8a/gcXQ41SkgWL7aRoo4hu82zvDiBkZPWyUVKdBgMeGVYRmB2N1DfyfUZQzbT9TQ= 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)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:BN1PR02MB134; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BN1PR02MB134; X-Microsoft-Exchange-Diagnostics: 1; BN1PR02MB134; 4:NjqEsADrMvWAuLbyJ0oP+ChoyJmtf5VpwrsFMWCPUbuVsWwDtg9/58Uv5BNf11f5oVUCJBT6D745eweqtY/eM8Pl89ylhm1/qiKkWcmKu+mH9io0YPD2MvvV7jI3+ZctvaFxG3fJhmrs51BumMf3X9gy1ipdsuTmK9UkOlkGEU7I+BMFGV7BhrquiKy7zT2U+6pPxqdIVhnzT0a/2QQu7Qxmgw3mdg/qOBYtbw5ORBtP9gtsMJnTqDTQGkO+zbwR6CdZIfoztsM7yRDgqsFNdXa0weop6Rn6Rn906KJXT0Iuf65qF1haeKyYmxnRcYTV X-Forefront-PRVS: 0534947130 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR02MB134; 23:wrkMFKB8DaIqHvQDusobpVYAkXie90cNU9EJfpHVls?= =?us-ascii?Q?KtiYRuOnG7eMgBjab1FHLp3qwvMdwK1By86WIXNJowGAU9cxFcHeghoVM8ho?= =?us-ascii?Q?ZztIAnguXbPBGdUM5T8zOnid+5yZGboAuIEXw5pYCa1WruCmdKUoEGu0oyh1?= =?us-ascii?Q?uxYgHoeNWfN4aY7nFAPAbx2EtwrYQiJYvIohl7YVw8g1YnKvQ4sVxEHq4fo0?= =?us-ascii?Q?ahCzBeN8vulBpuZxR+iF4nJEsV9cr5kQHbwXMpmfJHjTWVIW31dx40bRXOXN?= =?us-ascii?Q?AxJUYc9jc3lIlZCc/ouoQ02P6/GRw4ALH5e6fs15JFBkDJwU8ZBtRxQ0lLuR?= =?us-ascii?Q?ROOprYAHt/UHBsccfVh/JWdiTjyfk/mPnCJJJpdupYe0WdbsKVG6x/lZrMpe?= =?us-ascii?Q?KiJ+eD6DUEBn0GJeNBVP+mnKEndQ8Xg+BOOL4jyZJsOVktqv367YPTjT+8mq?= =?us-ascii?Q?AYWLNlBS90BLimEQHaZvJYzQbQr5nkTlj6+dNQMG3HPJykFvNtjElkbcDJJZ?= =?us-ascii?Q?otkdLM+W0FQHXK9YPjNNwNuNpnS9qok+rQZc7CXYLyy7Vagveiq1UaVGoqi7?= =?us-ascii?Q?wAQw7BCMATkUCNRyeFoWJDYpyf/NngySNMLvqAGDohlo0760GmPjn9j9LA3G?= =?us-ascii?Q?y9xOr9D2nX4+Oi0Qt9r0ZUbDEFBuf6o69Jcbxlswc/OLoGlP7FAtv7DJrMQ6?= =?us-ascii?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ZK0nC+RmA32I7cB4i8tjsM3sfElvD14pBQsdmFTt6R7dG8oehlDNP3gB2oRBdQorAANTFWknGmE8Ce5Uhy2U1l3v60=; 7:6UiYaTlO/Tx4iZ72cMGgwLLG7tBCLtaCFZNcEqmKqJJlM4QXfEMFtVMmcJfEFgArV4+6Gf6xV+ZTi7Z37L2GREsKzowJJAqyjsOwQ/pf80Wg6uA5oDO1ADU2HXB7DjnJPuHsOAGLhVxIyFo+3dIm48KRq8yS2Xx8VJp5o/b8JVxvzGGpJx/1/iR/Fotlq1LvL6oGZIZmzXnUclkkTfDFkmYELdqxZYxfH3jev+lm4JbPpMYiA5UzWSUpp48R+Rh8 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2017 04:34:39.8743 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 14f987a5-912f-459f-ff60-08d54ce324d4 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: BN1PR02MB134 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 As part of the recovery process, the drivers removes offline devices ( done by the kernel) and then tries to add them back in the rescan code. Removing the device is like taking a sledgehammer to a nail. Set the device as running if it is marked offline. Signed-off-by: Raghava Aditya Renukunta --- Changes in V2: None drivers/scsi/aacraid/commsup.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index ffbfd04..32b8bdb 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1658,14 +1658,12 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) command->scsi_done(command); } /* - * Any Device that was already marked offline needs to be cleaned up + * Any Device that was already marked offline needs to be marked + * running */ __shost_for_each_device(dev, host) { - if (!scsi_device_online(dev)) { - sdev_printk(KERN_INFO, dev, "Removing offline device\n"); - scsi_remove_device(dev); - scsi_device_put(dev); - } + if (!scsi_device_online(dev)) + scsi_device_set_state(dev, SDEV_RUNNING); } retval = 0;