From patchwork Wed May 10 16:39:46 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: 9719267 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 2136960236 for ; Wed, 10 May 2017 06:24:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12787284D5 for ; Wed, 10 May 2017 06:24:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0731428552; Wed, 10 May 2017 06:24:31 +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=-5.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, 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 71BDE284D5 for ; Wed, 10 May 2017 06:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581AbdEJGY0 (ORCPT ); Wed, 10 May 2017 02:24:26 -0400 Received: from mail-cys01nam02on0070.outbound.protection.outlook.com ([104.47.37.70]:59902 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751585AbdEJGYU (ORCPT ); Wed, 10 May 2017 02:24:20 -0400 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=krv6qIJV6FmWoOrR00hz2aVdbCp4I/M5cRA9YtIrZaI=; b=Pog1fSfUjDFXl1MHWdYD2NPYtQWRBaiTpnhHqHckCcQiYVCVwNo+xYUMnLkaePj9Bsg7sB9glphnFXrWcOEByjpjFxbEQQ8U0rGNDNmCJGYSzI/d8utQNFvcNZPYQJynMl+zP63yu4Vo4co8vHVS/meb/18jsE/35uPzFKZ5ryo= Received: from CY4PR02CA0035.namprd02.prod.outlook.com (10.175.57.149) by BN1PR0201MB0724.namprd02.prod.outlook.com (10.160.169.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Wed, 10 May 2017 06:24:18 +0000 Received: from BN1BFFO11FD011.protection.gbl (2a01:111:f400:7c10::1:195) by CY4PR02CA0035.outlook.office365.com (2603:10b6:903:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11 via Frontend Transport; Wed, 10 May 2017 06:24:17 +0000 Authentication-Results: spf=neutral (sender IP is 208.19.100.21) smtp.mailfrom=microsemi.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microsemi.com; Received-SPF: Neutral (protection.outlook.com: 208.19.100.21 is neither permitted nor denied by domain of microsemi.com) Received: from avsrvexchhts1.microsemi.net (208.19.100.21) by BN1BFFO11FD011.mail.protection.outlook.com (10.58.144.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1047.9 via Frontend Transport; Wed, 10 May 2017 06:24:17 +0000 Received: from localhost (10.181.72.13) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.339.0; Tue, 9 May 2017 23:24:05 -0700 From: Raghava Aditya Renukunta To: , , CC: , , , Subject: [PATCH V2 12/19] aacraid: Rework SOFT reset code Date: Wed, 10 May 2017 09:39:46 -0700 Message-ID: <1494434393-17261-13-git-send-email-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494434393-17261-1-git-send-email-RaghavaAditya.Renukunta@microsemi.com> References: <1494434393-17261-1-git-send-email-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)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39860400002)(39840400002)(2980300002)(189002)(199003)(9170700003)(47776003)(478600001)(2950100002)(4326008)(105586002)(356003)(81166006)(106466001)(76176999)(8676002)(50986999)(54906002)(36756003)(76506005)(189998001)(57986006)(5660300001)(107886003)(38730400002)(53936002)(305945005)(77096006)(6666003)(50466002)(8936002)(50226002)(104016004)(2906002)(5003940100001)(72206003)(2201001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0201MB0724; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Neutral; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD011; 1:EJ0qNyfbj+rqC6tXtJuk4MmAulJxhEOnuYRQdouDQ3OFQnWI47f3A1l4oeL7rc6wG3LmIwkuYnZde+pDZ7Dm3w5rltp8DSXGj9x6mSJZYyc4iWHsqJzAekWfPGvpKed2nBH1u4+yv+9E3nqeK9Zz4D65i+cknNOIq5rqQN3NeuOgYPs28zSxDVuzV3QVqLnDghpQU6UwMFim/RGBjsKKO1ZyrBb40+488kujvv8MuquLxzQfaR1ZBPOI8vr3aA+YPGtM5SRY98Rr7cFEzbCNXTNI5ZVffSYL6EvlCiDIM4+v7INqq7GpzqbV52RQJeseGsrJzdAAgimeQwcxm5/fChwhqFrBIdAK53mT1bpr85KNB6o4FsLzpy7+SPgXaF5xwUcwqgNWRSVZ9e3YYOBT2Wiqy83H9updGgEmOhzvZyT6gVYFsXScUvSaFkCsTnqxqZ/SlAH4jS9+8tYLr9EtgmH0DblA0FccJaEWcHBdc9QQdkO01pMyBtjW/l0WEfUv8sjygvZNatN/ZbAS4pYXXDS68w9xWFOLKcWNvQz32rCW/Fc2zpQ1/zeBGrL5vwD7MbNkhXUD6WFT3WXLcE5rZQ== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f7a5bd8-6743-4902-dc6f-08d4976d3010 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:BN1PR0201MB0724; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0724; 3:kVu1z0OYgh2YMeaC2QdS6lrtW71wmTXC6qmU3Ro97f3cNscx66BtGTgFHuVt8NTd7YEDGjJ80/Dsqf1HQkmOvr0jcr7rJsadwwQY6k1ZgiYNRZgObhacRMEsOk1TKCimUsVHM205WZdPSiSeGv6Gyh3/yInY7PlBqcQrZctS0IucqGMcsse5Q9pGLbnG6sR209aj2cIU7Fso6vMl1LFE0rkZB3IreQr2Fis6wzgBleuzGYWRRiyacQ9YrR51GfP1jKOpPL6FRXqDCGxAU/YQlJQQH1TfQCYO7/ohaeNrKOqZm2+LovBBR1B0qL//ROFUAJE/WX1+eASDZ3FugTeAjQBuSufP3cFtp53UaICuLM29VtL/G2A7vMrAgEp/WDBGUzPxgRSRDIbWPj5JS9vgo9Q5ggDo3eB68Ph/RctAJb3fmwJtlo+bp3CZaMGta4OOAn6DrWh8qMh4SscMAdCitQ== X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0724; 25:z00EgF5pJHoeJRDDR4Jx/u5adHLnRhevRrGQmkvOQgUnkl7VaAUaMbYO82P3bUjrThIAFR08p+1PBSpN+KlktzFTqqNVkHBOhyN+JWmdea0SEuYN52FZ4vUDPA6nV/ZJQpYTzOa/EJ9UFxjiT2aMkfOc6R/1OncZfe7v3pUlMnkenWdWPgufqQqwxff8/4873YelU7WQns12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U0iIM+QuJUSJxUc1xdv2hQ3UniUedZDqxlU/+n5qF1opZ5Dd0R3iRMSpdX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13023025)(13024025)(13017025)(13018025)(8121501046)(13015025)(5005006)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148); SRVR:BN1PR0201MB0724; BCL:0; PCL:0; RULEID:; SRVR:BN1PR0201MB0724; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0724; 4:i+t4Z/7lkrDTuaA6I7PqbZ7VRWoWTStx5QH64WLrWOMY56k+3PnLy4cSf6Q4f+wAbcUQcL5I3w7Lr2t7RcoWvlPlnqpudAhKlOSv+2SHPSAbZZkula/dtRxIRHv/einkR/J0tm4LsGQVhhcHWBoir1XCvxFAdqOiERorstbbKpGYFmvKp3S13JllAVkFsDEe/DsvxIQkQaTWEqeJ4+8p/G2lvA8eZeyHdXtgtm9Hmtle+++2oB/O27YxfwoIBO9z5nCiC81Lfe9pBz/PthJxrABeo34JWmGKOVxurS0bNpIA2ODFLmNLce4HZvuAmWfnMTeruKkof+0NvlOTwMacY8LoyK8k4b5h5OHm9tCs3QMgh61EnoDocGjojzXBFxaYkDEF4X7FbON36Ah60R+1XPDrWEpbIlcxkB4IPRCp6mvfhz9fo6M6hWFajJxfO2/tpoDt3/vKwS89vTC8F9MvG9kbdlkyMsGtKc7ViVz1OlG6FgM3psTpn1Ynm3OnkLCmt70nI9HhEQSNmaj8Zl692R75LB5feM4g1E4+NLeN6VdaCdSu+FK845az1VXIyVRysYaVSbBmvQ/oKoB1MMk6z2q+8EOh/v8zB5HktUbzLOECWSLmILyux2Pc8FA5Pzudkkgu6nl53Sem7WHLfoO6XK85crBoa3466qVVbPUFP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n2+/XMWEZa0HiWw7ExArs9870b8ZNK1W6X3kmTTAfpM1gAgGGjkQk3llba3ms17oi/ZCeXe300EbJzowAMZHSXc8kVDxDIRoQMtj5D/Hj7Wgnm+Y3GckGvFEWw4TlwJvOlPlgeZx25ct/QOdBbx443qymSuwus=; 5:i1ux+ueZCY0ilBrsbIXlJ6IaAGchN0LbgDbcdoCchrSZiS0OEU68MwQiW6ikiiCobyxTipCo/owhJWiRFkcBdmMhhmv3FEie/KZVpr1SU8KlZjJQMDu9FdSjmdQQ3jx8D8Lh1NdorQju3reUL4W2Gw==; 24:qo8eF8nx8XjHtgdn5kVi3J+3FdIZVip99+0sBN9JURguezO8df1xX6yxwcKZZAdG1A0InWrrAjZIzdqr+lyJ76XXqjp7aFfKtkvkgVToWRg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR0201MB0724; 7:Vl6IVkLlKlFBfmD2tKCd67gcfEDluqmAyZC2BKW6BH01b2fiT01jAO4ujQcAnu0YW/4rhxKMhvbT3RFVKPuhcn+4bkpA8ibD6aOcrHJH+dWDnP2UoEXF+m5qfsdVbiBmf5qbvQgBrgPaVSQnR3jSGrSI3S8NEVJ9iuXxaJepBSup8D2PsIttrgVMGERN8TkedPgv8DaGS2ikJtguDwu6O7/omEu6YjMldxnRefq7RQPxgu5Ox8ThdogkEuZpTWFGYRLCXfuZp6wxfftzOw4P7rICsHxGfk/iCd5VXujGGpM1e+XCatH9xBOz0xQMSIpnUJLNBl6Hq4kLZbewEmAu0A== X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 06:24:17.6447 (UTC) 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: BN1PR0201MB0724 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 Now the driver issues a soft reset and waits for the controller to be up and running by periodically checking on the status of the controller health registers. Also prevents ARC adapters from issuing soft reset if IOP resets failed. Signed-off-by: Raghava Aditya Renukunta Reviewed-by: David Carroll --- Changes in V2: None drivers/scsi/aacraid/src.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 67185eb..8ed7be0 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -754,8 +754,8 @@ static void aac_send_hardware_soft_reset(struct aac_dev *dev) static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) { - unsigned long status, start; bool is_ctrl_up; + int ret = 0; if (bled < 0) goto invalid_out; @@ -785,24 +785,21 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) else goto set_startup; - /* - * Check to see if KERNEL_UP_AND_RUNNING - * Wait for the adapter to be up and running. - * If !KERNEL_UP_AND_RUNNING issue HW Soft Reset - */ - status = src_readl(dev, MUnit.OMR); - if (dev->sa_firmware - && !(status & KERNEL_UP_AND_RUNNING)) { - start = jiffies; - do { - status = src_readl(dev, MUnit.OMR); - if (time_after(jiffies, - start+HZ*SOFT_RESET_TIME)) { - aac_send_hardware_soft_reset(dev); - start = jiffies; - } - } while (!(status & KERNEL_UP_AND_RUNNING)); + if (!dev->sa_firmware) { + ret = -ENODEV; + goto out; } + + aac_send_hardware_soft_reset(dev); + dev->msi_enabled = 0; + + is_ctrl_up = aac_is_ctrl_up_and_running(dev); + if (!is_ctrl_up) { + dev_err(&dev->pdev->dev, "SOFT reset failed\n"); + ret = -ENODEV; + goto out; + } + break; case HW_SOFT_RESET: if (dev->sa_firmware) { @@ -818,13 +815,14 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) invalid_out: if (src_readl(dev, MUnit.OMR) & KERNEL_PANIC) - return -ENODEV; + ret = -ENODEV; set_startup: if (startup_timeout < 300) startup_timeout = 300; - return 0; +out: + return ret; } /**