Message ID | 1494164064-17715-13-git-send-email-RaghavaAditya.Renukunta@microsemi.com (mailing list archive) |
---|---|
State | Superseded, archived |
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 2AFD4602BD for <patchwork-linux-scsi@patchwork.kernel.org>; Sun, 7 May 2017 21:43:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B82726530 for <patchwork-linux-scsi@patchwork.kernel.org>; Sun, 7 May 2017 21:43:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BFAA267EC; Sun, 7 May 2017 21:43:37 +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.4 required=2.0 tests=BAYES_00, DATE_IN_PAST_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 6588026530 for <patchwork-linux-scsi@patchwork.kernel.org>; Sun, 7 May 2017 21:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbdEGVmp (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Sun, 7 May 2017 17:42:45 -0400 Received: from mail-dm3nam03on0057.outbound.protection.outlook.com ([104.47.41.57]:50912 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753270AbdEGVl5 (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Sun, 7 May 2017 17:41:57 -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=nvx/OaUnehlVptF41lbdx3r9GXXktpmcEc3IiYgEFQE=; b=LN3qaWEl6poa2jSAhpR4mzRcaUAtaI/uvZVNvhtpEUY4Fb9JlICGZONDwokbye3uMrgzHNLBSELLPZ9a/U++PTQJKfdc73DANxC4o9iRJ4aC6cQq7v0lT2qhlwh4pHMMLd53HV4pVIQWhOn0ihjYApGnDITiKFDGfKoc9lLR2zw= Received: from BY2PR02CA0088.namprd02.prod.outlook.com (10.242.32.46) by SN1PR0201MB1902.namprd02.prod.outlook.com (10.163.76.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Sun, 7 May 2017 03:18:54 +0000 Received: from BL2FFO11FD056.protection.gbl (2a01:111:f400:7c09::115) by BY2PR02CA0088.outlook.office365.com (2a01:111:e400:2c2a::46) 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; Sun, 7 May 2017 03:18:54 +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 BL2FFO11FD056.mail.protection.outlook.com (10.173.161.184) 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; Sun, 7 May 2017 03:18:53 +0000 Received: from localhost (10.181.72.194) by avsrvexchhts1.microsemi.net (10.100.34.105) with Microsoft SMTP Server (TLS) id 14.3.339.0; Sat, 6 May 2017 20:18:36 -0700 From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org> CC: <David.Carroll@microsemi.com>, <Gana.Sridaran@microsemi.com>, <Scott.Benesh@microsemi.com>, <Prasad.Munirathnam@microsemi.com> Subject: [PATCH 12/19] aacraid: Rework SOFT reset code Date: Sun, 7 May 2017 06:34:17 -0700 Message-ID: <1494164064-17715-13-git-send-email-RaghavaAditya.Renukunta@microsemi.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494164064-17715-1-git-send-email-RaghavaAditya.Renukunta@microsemi.com> References: <1494164064-17715-1-git-send-email-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)(6009001)(39400400002)(39410400002)(39450400003)(39840400002)(39850400002)(2980300002)(199003)(189002)(9170700003)(106466001)(5003940100001)(76176999)(50986999)(104016004)(2950100002)(356003)(478600001)(38730400002)(54906002)(8936002)(50226002)(53936002)(107886003)(4326008)(2906002)(6666003)(57986006)(305945005)(189998001)(8676002)(81166006)(77096006)(76506005)(36756003)(5660300001)(86362001)(105586002)(47776003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0201MB1902; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Neutral; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD056; 1:idehqE7/gcsZS4WFT3FV6EMV4G5DhdqNkXtW8jqtrYd3o3gDoRJ2uwDxzQVq6E6ltI9sL4Sfboi4nDKxGwPs4DU9TZTIcyUAxqqnqnIdmZ0dgq6mH5MDJPpw6d8pPiiCxpLSrROX9/lD3DmrPM+OTw9AWjroY65BK4JQJZe+snD/ENzCVQVQt5YdSHWYB2T2aWXMy7Zi18t9tBOQxWYvFVplZYsIG8csGImJpDqoAhaCqcothCAMBq8dMYVT0RtquPz4aqkIHBjQBtvZh7fjPPQb4ZxS7YgGefZQ+1xiVN16skoh181gbU3ZGZxqKpxmSq419mLxOsE0rrBuNdc2+sa+0qiYhdPeMYxsAgavPJe6fYadDGlsCV+2FJOmlab1JAJx74HpLTcIkmZdL8bKx4cFPm3kDQOcGNMc/hlzVpJDWLTJx2UbzLOq4kIi8BIVP9mDxS3No0H/vZB5nmXil3ulGaZOSlkaNAr3DCAuVBfkUkv/jHTNVZnrulcBbhAAuXVkhiyOHMMTQznzawOoy3uOeStONwY/udBGthbBSrW+sCUP0g0Rc9dNDHYoNZKVo22txHuJzgzG+XUehXaxVw== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18e97494-9d56-4701-1ffd-08d494f7ca6f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:SN1PR0201MB1902; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1902; 3:NPPwx7m2gHuBQ6UvsOkH56V6krCx7HQXRheJKfWmKiWyOx/1dxkCsVYn0kxdwiVBajc22QlusauXzN1O3p2snX/Qep6liIaZ7FBnkx0ge8Uc5eYZ8S2XSt+1a30D1sjdWY4Z6XFZVvoTB37Eip5fxCCoaOUDUZZMH1KQU/jMNIB+0BOVwJz3WF5ePi7vHGGXB2z3d8VgFVZjDiJd4RVhRjkodgQZwVmmNPhrfA/ZQSFGPVddoMZieX3Jzr1i0Vq/vDxMFYCqwAIyo+lP78w1Hg7C7ORdgu5fNQlq5BTPHmW4diyoGtJPEvm3JOQDmSTJoIiuso3BNPpcuqJlNDP0xXToqorXf2hWX9lIG08/j8ibeZs16fCnkrCWkU/IfmbTUi9IuXnP/Jbt/5qH/1dl8xT1eNJ49fuy661vIo/sMEzkhc0axRmtmSJ6alZer+YMhnha6nknDHqUdmqVn5oQ0w== X-Microsoft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+SCi4VG3C0md5i4FH19kCGbcQqdRat1QC6wqQhtrjXhLHemsvNBJBBB28UQ+JTu0cwDavVSk/AJUpS1QtXqvkHjp4B7LeBC1Nsp2zHbWgH8ZkNdHDjkgCUZJq6irpt2sa1IUE1TawxBmkE2HRaiAPEcmZIATu8SuaRU5bPhhjmciXMew3EtNBNqJejjDzUJxRANgAY6qJi6Xx5O6fDXp60mHuaVKaJkrscsei2BAR/duv5eqUrDGtyYdGuSvE0amYMebZI7WP0cuk X-Microsoft-Antispam-PRVS: <SN1PR0201MB19025EFB63EF1DE0FE8DF08CF0E90@SN1PR0201MB1902.namprd02.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(72170198267865); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13015025)(13024025)(13017025)(8121501046)(13023025)(5005006)(13018025)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(6072148); SRVR:SN1PR0201MB1902; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0201MB1902; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0201MB1902; 4:EmD+YNKYalOxGLIj1hUvWyU09XfybYhXCfKnl0pVhAhy1ihl6CEsWpcq6bcKSDSnywDj9p+2LmpUGtplBbavWes19ZCEZwG8FgVkUe9HmrkH4S6GeUNJaTp/R73r2IYuMTvj9HeTeIUpZEqJz+wDmwDOX9rlGwhWjzUwu7bGxzfMx4hbZYCZF+KBCsUvKEQ7pGuSsI22+JH3dXRtcnSvkLahMgcb01l/zf7yw836kJDWB5VMJzUIIgOCbKSXUJOJkH7kcPkCRUjemqiJWjLAhTZyZSmRurTSUksZ8urDFSfeePKO6DhdhidnDc3gLo3n+r5QTncQLvk752zX31xFaLgUcdCByfZP9B0j37Dd1PIbU5kI+YokmsO2PVtLQmUFTqoWGJoLuILdS0f+OdZPIseIC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V5eVNYZqil+xfm1TAC2bbw7BwTM+St3IWBZyRHnAWCLjKBf8KyUaxOvocynN9sy7a/CzgYhpPNlni0n1aGldGjID8WNNkNYQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2017 03:18:53.6919 (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: SN1PR0201MB1902 X-OriginatorOrg: microsemi.com 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/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; } /**
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 <RaghavaAditya.Renukunta@microsemi.com> --- drivers/scsi/aacraid/src.c | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-)