From patchwork Sun May 7 13: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: 9715425 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 5988A602BD for ; Sun, 7 May 2017 21:46:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B24026530 for ; Sun, 7 May 2017 21:46:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40097267EC; Sun, 7 May 2017 21:46:04 +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 C805226530 for ; Sun, 7 May 2017 21:46:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516AbdEGVqD (ORCPT ); Sun, 7 May 2017 17:46:03 -0400 Received: from mail-bl2nam02on0047.outbound.protection.outlook.com ([104.47.38.47]:43008 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752667AbdEGVp4 (ORCPT ); Sun, 7 May 2017 17:45:56 -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=gh+D67AcL2kBd6gvMzY3DTeeEiraePXnfzH3/XRKiXg=; b=jNWz51IYKZIT6cfsxo18y9v3aNDmyW3bpXHnfuhhXccxsiO5Q//Z1Tj7huqrAFE3fkyXNENlbRAzypMydIiTju5+9AoMbKJBpkiAaRAmEuQWJuaNBtBtDRlG6jdXTWAZYa/eUene9YWlJ323cB4Qq0iVNih5Bhw4G66ik39Nic0= Received: from BY2PR02CA0088.namprd02.prod.outlook.com (10.242.32.46) by BY2PR0201MB1893.namprd02.prod.outlook.com (10.163.75.147) 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:56 +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:55 +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:55 +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 To: , , CC: , , , Subject: [PATCH 13/19] aacraid: Rework aac_src_restart Date: Sun, 7 May 2017 06:34:18 -0700 Message-ID: <1494164064-17715-14-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 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)(39410400002)(39850400002)(39400400002)(39450400003)(39860400002)(39840400002)(2980300002)(199003)(189002)(9170700003)(104016004)(53936002)(36756003)(107886003)(38730400002)(305945005)(54906002)(50466002)(106466001)(48376002)(105586002)(6666003)(2950100002)(2906002)(47776003)(356003)(77096006)(8676002)(81166006)(50226002)(189998001)(8936002)(2201001)(86362001)(5660300001)(478600001)(57986006)(76506005)(5003940100001)(4326008)(50986999)(76176999); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1893; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Neutral; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD056; 1:zXosoKOXkMPlpJ2Si14q1vQzZgyVuAEuuXez/YwweMMHUmf3mgUa8EvLnRm476s3lRHkuYmTAyJ+vVSGcNk8e5uWaRLbzYMworAPBMmBCNFuyV7Xa0UETk9JIFYU/grjqcr5ngCkdSy9WSSzTeWfviJBKPyNfeu/7AbNqg/H+aJqhoB2LrHdpTN/O1MLfFgyh5eJahmwhiImlXxHBYbn7xN5vSBha1+NY1MJsCp6P4tz1R2RDzBY7wD/J7Ze5CGn65QPVsr6TzaQwFvwalaLUH+6dHuG2nbmL31HMjEs6KgHAhPXNGwlyuXy89IT+5QwS9vvBcZ+DJMjg+B74ikKJO7HYngctjoM8gYXlz3SzIl13izpEpqKZTvQcJvxq/kpwHGh7QgLuodaetyMJ+fMIOpwww7MM1qLvC1KvY0TyJCgFxn55jl6kvjPWear4mKNfdkYmt6MrSjp+crGhUYLN1neoq1cBDxWyFfWJqzjlty30PBPeYiYOOWNeCysPbmLLUYAgKBcz1rlljbelZqS1nea5/hGB9Qc5QrB1hYmgeZ1l+MOlEZca5X31zWoQdIIQotZC26dpIkDTiuwifGmk/vgK3GWjy4f5vwYVVG63q2wIGY11hEUoA1IJ0XhQ0aZ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3ad003a8-8af0-4ab9-d1dc-08d494f7cb6d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BY2PR0201MB1893; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1893; 3:EKucm/pdTtjFy7JngbDxLn5mfzd87Ip9fbjK+yF6ipGX9TXSEDJtrSi9JR+D1zEeBFZrG/VigSCyx9mNdMFZAV8Z7SymkEhf1z48jqrhGg0A3X/Dw1LaR2UpKL+PLT9Dw/l6xTFrZ2OqQb+mnQVrpZp3Ziz7CsE9vDbuNclyhDxIhP9LIHw5ZtDjssIC/4ilGGtoLLi+52hR7k3nlimob6abx5tCC2iZhFSfGgci5fivh/HFCF1dOBG9/7tzGzittyQl3Px1eT3q0WKwaUvwIMrXREIVNdjUUP54Kq0FDjkLojV/RNg424lLpDaWodeutAmAjjkxMAoPTcp/qyV0CIoAlK68TQnAwagfoFU1ivLg1QwaZh96mnUTqKvbYWv2SNA8qlxCRKCRkuFdra7hVHSF3vfxLq+ICsA5EXN+FPF4QhgKaldGdAZbxlfIEt10SBAiQPEL7/7pUWoF0CkgR5J2jAcD/IJwvwf+5m/n3Cq/ao3P7h3BXYcKI8igD8vq X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1893; 25:dHX/RAponA+6L+My2VxythW+yqz0lSluuPH5M+0yUVEBhDtJTbzVBhE4o3HRvQhwkmTryIE5NNuyY7nkGoSZotK4ZruuOaN+P3OcEeSps3KOhBuKnPbR+PG0X7cET0jEPL7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SQJgGz40QaQoJzqeRu7gxbbR1Nsm93AMg8rNCRnQHy7g9Pd+MuEbvp/96YrjEYMhMehV5tj1+LX4a6twjAWHCi3vc+idjSsSQo3AFI7bBt4rSG6sq7v1coSPBQcYvwMbGUrooU0 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)(13024025)(13023025)(13018025)(8121501046)(13017025)(5005006)(13015025)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:BY2PR0201MB1893; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0201MB1893; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1893; 4:jxsYUURnaO+PDt0dJ+Ymz7DNFxbdGbXWcc5vHSEl7CKjDf4Kf+gS+wwdzq+HCEvphQLSOJlcre/KJ77YX41K1jBGSvdMlLSsGeC28VunSMcxwp8YJiUWrq/8Bn+fea1798jc2I4JZFNDCv2Ldnfs6GdfS/TuCUQA3lSh9Ra9sJ+nsxyQFmNpSmCweulVRX6aBXwEmLoa+lzV9mRyqb7KHyUTcZNBjgYWrTtrdwdYAGhm2OpMVn+gx0ATLPrUHa13sOMtVZsrKmL8IduScIOFERFDItHEho4GRKlJBsZsmGLgT/qm1Ln2Wi12AemAr0WR/Onjok3sm5Wbzm57+7zacHTBL4Atc0HdQs+0q9xmyVnwJPyXW4JZwYs0DubxkJzeqgBnEe5ecP5o0pA9YYJ/5GekMtY/Cf1ksgAKL8V6wIRGHl3rSVB42kSxuGhYTmK6ISyG7vnF1JzRayUlb5YG8eLfRiHzKvkVBxkokp58ukF6zyewNs0Uhn8TCw7OEg95PreJWz977P5pz6mXm/VLF0CIRGzL2ocfqK7fvjrq+JeRoLsLbPk+vooL7tXRxO3ap6rP3TEpBW4nAeDLlUtwyM84D7J+jA5q7sSlA0wXJzzvrfG31YDvrqdZIOqTxR31bVvbU/XzII8ULGd034BPYL1EXc+WLUfvn9JoR8CKVfnMtzsGaplnEOXhtmH0RN8SZNT2c3+eELE2RyIr0/ma05+8hAuaMSfBXD0E4AidMf4mtSoePmfzbSxJfrqArFl7rFM3I95ocYUAOSg+wEfAhhJm/+AQAvn6fZe2aFm5aZYIdR5ctbtpNV1ftBoXbWGBga9xtK5aBGygalojhkyCBSc9VG8xGLIizqgUBttFVOEl9kiMVYc6DLxmrGKE3Yf0j4CIF5KJpYAz7i4xaInUAv1/ZfYLDRn7tM7PxqVs Cc8pyMLOEyo0nzKB6iG/+kYC X-Forefront-PRVS: 03008837BD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0201MB1893; 23:5tuZ4VjqdHhzH4yJXDeaZOQcPmNgTnldEEf2bb6?= =?us-ascii?Q?tIv94g7ewO/pwL8jZiadufo2JTfkaZgyJXMWtTOcaDjyUuMH7kdptD9M/kbX?= =?us-ascii?Q?r4l6rh6jmXqTgaN2l3+X9vkdO6POqocUlYDhoUCUdjhW6WxNzrTgLa0WquS1?= =?us-ascii?Q?69vGfe057mBNAZdxuO/qm/2hEKEZ7sTD9LJSLPF6RdOjfkoHEigsPSFeqvjJ?= =?us-ascii?Q?tksCvcZcMMlYy46LwI1B2faNNlOv5zVyC1prloVtS5y2HWdBSoBmwR70suBr?= =?us-ascii?Q?j9WahgiruCQt0mBFfWhi4JWjsA41Jg3dhBWk5VJKCxzATyq7szk3JIETOclM?= =?us-ascii?Q?LybY8LiPvogFoxrqQSEn4QJ7d9ZN08chOtQEBt4FnBEngUDMZpYWdg5Fjnia?= =?us-ascii?Q?0Cpchdasut6ErHhsiv8Qa9HeQW2i5arP1INj5J4TQ6b4n98zGS47H4aats+H?= =?us-ascii?Q?xib7mmLuM99U0Sdfp4zH5nD0/H78ehazPwcfXAbBmPMdbmh/kY4sJLaZJDo3?= =?us-ascii?Q?duR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pA47E1IaOxARVnKEutq7DjI0a+9hwmxMERxmbUO9cu6i61Q8lLxQriantVDQb/WV22bkN8e4K0UxrWblZuZ/0yazQyZfUx6ObNZ1I+w76GwnAzuT6BORoIScRks3a2euoYRKV3HBSAZx7hWpPKRP85mv8J1cN/cccbhPNEi5HuM6MakHSwY+Toka7qjjVGrG7AHnQPJpiqz7qK+/HpgRF+1kNDYHpWyHmQxJcqSXeE9V61urSuMdY=; 5:mAH+l6PXYmigzKNdPAXWiSHI07EvQ1qogaArGIjQuuj5g3IIZcARZwU0MhGduMD9QBwDx6mSld+6GTgfrxh4eCpv5OTdxCEbsSQziePg6lKn0GlObv9iG0aNUritZHOAyY8PgwC0F/R6c+Nr4GE/eQ==; 24:XOhxG2X0c3ldb481Q0CGP09pypKtjS0Izv3FcXhErLXSx0XI/k/QKKP1PjLBNg7MtSMtFWRmozsAjquk8/ryCmPhFstu7Fe8lBMJCCD32gk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1893; 7:62JuPmt5HMxjaZhMiv8DdResrnN8T8xcf+sf+ngLKs47BrqyRpT4HnBIgBh3HkjXo+lWWFvJPPKalr7tJVR0SH1p+Ug1hOdG7VwFdBDFgXW6egXP6yxszFB6iLscxuvqVugCEexipGr4iUFP+5zGRz5m4z+yG932IK97By4ydyqN870LvllONno5oDiaRmVZGYrQfDlKdrIUqw8SO5UWEeJNd7MdnuTcSxkprZjsbEIyPozEeVn5i6GLn15UwFU6EpUe2/akr7We713v028RDlDp1S0UHBXvS4JIuSMElRsx9MShfp+ADqvktOlbMjzxB9F251Di0uI8GS7gHrjLLw== X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2017 03:18:55.3455 (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: BY2PR0201MB1893 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 Removed switch case and replaced with if mask checks. Moved KERNEL_PANIC check to when bled is less than 0. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/src.c | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 8ed7be0..10a589b 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -772,8 +772,7 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) dev->a_ops.adapter_enable_int = aac_src_disable_interrupt; - switch (reset_type) { - case IOP_HWSOFT_RESET: + if (reset_type & HW_IOP_RESET) { aac_send_iop_reset(dev); /* @@ -784,12 +783,14 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) dev_err(&dev->pdev->dev, "IOP reset failed\n"); else goto set_startup; + } - if (!dev->sa_firmware) { - ret = -ENODEV; - goto out; - } + if (!dev->sa_firmware) { + ret = -ENODEV; + goto out; + } + if (reset_type & HW_SOFT_RESET) { aac_send_hardware_soft_reset(dev); dev->msi_enabled = 0; @@ -799,30 +800,19 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) ret = -ENODEV; goto out; } - - break; - case HW_SOFT_RESET: - if (dev->sa_firmware) { - aac_send_hardware_soft_reset(dev); - aac_set_intx_mode(dev); - } - break; - default: - aac_send_iop_reset(dev); - break; } -invalid_out: - - if (src_readl(dev, MUnit.OMR) & KERNEL_PANIC) - ret = -ENODEV; - set_startup: if (startup_timeout < 300) startup_timeout = 300; out: return ret; + +invalid_out: + if (src_readl(dev, MUnit.OMR) & KERNEL_PANIC) + ret = -ENODEV; +goto out; } /**