From patchwork Sun May 7 13:34:21 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: 9715411 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 69706602BD for ; Sun, 7 May 2017 21:45:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A09A26530 for ; Sun, 7 May 2017 21:45:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EB4C267EC; Sun, 7 May 2017 21:45:36 +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 C018626530 for ; Sun, 7 May 2017 21:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753337AbdEGVpd (ORCPT ); Sun, 7 May 2017 17:45:33 -0400 Received: from mail-dm3nam03on0059.outbound.protection.outlook.com ([104.47.41.59]:37120 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752910AbdEGVpN (ORCPT ); Sun, 7 May 2017 17:45:13 -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=Dh50+ImcIPyqORvSrJb5YGyYYtmKtEdlc9WsYFEQmno=; b=YE/f/RwXiUD9T+6oR7eAkQFbm6kIKGlX83MSlEw8Yo2m8/TmhMlUFTyzdjzsjInuoj1evn1OIe64cY9u6hjI0J+CcJUsCrhvodHcUj5rAcqNEm+Tpl0/PVl7RpqxXridBnM6VGamMIQLLcHl/d7uRItNI2uL1pvkkD3Em9rrKaM= Received: from BY2PR02CA0088.namprd02.prod.outlook.com (10.242.32.46) by CY1PR0201MB1899.namprd02.prod.outlook.com (10.163.56.21) 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:19:00 +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:59 +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:59 +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:37 -0700 From: Raghava Aditya Renukunta To: , , CC: , , , Subject: [PATCH 16/19] aacraid: Enable ctrl reset for both hba and arc Date: Sun, 7 May 2017 06:34:21 -0700 Message-ID: <1494164064-17715-17-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)(39400400002)(39850400002)(39860400002)(39840400002)(39450400003)(2980300002)(199003)(189002)(9170700003)(48376002)(50466002)(86362001)(104016004)(356003)(50986999)(76176999)(81166006)(38730400002)(5003940100001)(76506005)(105586002)(478600001)(106466001)(57986006)(5660300001)(4326008)(107886003)(2201001)(8936002)(36756003)(8676002)(305945005)(77096006)(50226002)(2950100002)(6666003)(54906002)(53936002)(47776003)(189998001)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0201MB1899; H:avsrvexchhts1.microsemi.net; FPR:; SPF:Neutral; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD056; 1:01k1/5hj5RYN7ych/Y9u+7hozsXr60pvMnLl22fMBMTv5utoZVRWxwtUkq9GICbJ6jz9+u3SWHbFyevbPAHdQVUMaOmQK/hMoxq1Uwqjk7vyhTMigm0DG24K7+nV07wJmS8dUGzy20A9UQvY88/FgNFonwvR/vN3prlPdOt4cf8Xn0HfpGzKh7clNUCmXPuxZFdCAMp81SK6wQkMNSkcn3iW+K4RTN4lW/e51JmkQ/7OWQXIMGA6Rchphn51KwjnD/voQpZABS2/4zoFI10qdB8Ce9RdvNO1+/3YCoPhaJFZvDTiqBTyBUPh1gHV74m8LgiAVyH/VgVbhbW1iJdf4yQfMYWY+d0dK96xfPi9aBPEw9iP/en/zSFGJAgXWk7F38iLvQo0vMOckarUEBxccJ9YuaxBqpKXRYUzaMPQLsdhbmSVMRyjKdvsdic1My71BN0tJdvFMu4P7U5qOA58hJS1SHUITyISgxnn4vDph1H02x92wUuqDUh/iuuhO+t3XO1JT58ALR095BT05/BnpB2XsN1wT8aiG5VKVszQyBhSzDMc0+YQffm5KkDesRUPthSpW8gaY3DcI3fPRYYHpybV9qxTxOBfZSZFyN521YI= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97e42712-89ab-4c44-ffdd-08d494f7cdb4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:CY1PR0201MB1899; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1899; 3:Z2+HJHCqNBknV63KgtZRHOVxWH+H+Xk54B6GS/uAJ7uqpjvpKs1i5mXtlIdZjYSmmT1ISx2NxdbQsWV/PxVDRmaIK5BmLvej56vdanIGXnbXNFrIkFEU0kChyhZfuq/nkpYUlwF55KHDKR7uJ1MSxV7Y8sMboIx3hJKAasgnrFpt1plg7wFVgzca0AN/lx380vZSkgw4HNGu5VqjJdKllff7JRMNHuBytTx2bpUQNmoiNMEO/jpjTWLHbOdakiKNXRYwa180hccBAUrIi6xAM1rqXrX0w5Hi3FFROycgXhTrF/zM8aQes1eIKra5zIEX0r0k1yU+SlgmE6s4rgEaNSZjpVnLKxyOTiVeshD11R7IXPOGAOHwxUSgqQhDnF2Nb/I7o1lYsUskKPl4dARK6Nvfu8Blah7wD10wH6/t6XIj7jtVy9+1mVRsctkZQiBLgrQEnIRYP5uSpryqQnn0gQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1899; 25:Ox31IO62Q20HcXhZNWz2d5xndtIBJmB8msonGfFxCyl5qi0UDsrHSPExdJieSM8pLOVZ7GYsoioq4MgyiYCfHLaPHZny5684Y6jIs6Kmv//IfMe+1x727Umc+PgJ2OWBl19K/dG/UnQjFtc6g7El0oyN/TfNa372y0dYyfwWpxZwBvtHUfSHaJwaVDlZKhhOoq4vvINqdT2Caka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ST0BgfViIg0q9ZN3ay3HaZWJBBisF5hjGw7Ni 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)(5005006)(8121501046)(13024025)(13018025)(13015025)(13017025)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(6072148); SRVR:CY1PR0201MB1899; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0201MB1899; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1899; 4:6g5D8jZABo8FyoDwgP8hgiDsZmXh5tZvaWFVb2OGDfmsY6qX6StyaPgI1X0wUVBP3q670Cdxb90G+4a8ZmALLXAkHpit+l+A52qKvSPSVtj0GeF4Ijh1X9L36m2J6yIIcINzZ+OhLc7fuK6Yak1Q8dJt72ZuGQC8sOprIU9aGJXSunsqX7C3srVz5z1Vb/EoSZOJis1Cd9ba6QQbzn5j52gJPXVJosxrMY58m5T+S6uKrUmhpIQ55JRsYpuHE/mByvY9vZDoBJdhcLc9ZjyQfKnHaeikULw8ZqStxvPvQxq8p3o9cDcJ4x4V5fBT+3QphZ1CVcsir5W75ho6+e3ulj8uS8JRHq5KomGpS0nZ9s/wqq7xFiLDm0pFciol7zvXlU+5Snk0vd+1qOEV+HhJMGpmaqG8GvmE0egal7W4404T0wszK9T/bdEjSbHY5Zt21362XzyRHXtXc5vTzj1VnWoUsPuRD6KY3v55hqDMuMPn7HYNiQV4LyqRGTp4eLfWN9zNmVqYhFX4cpyBhyhQiGD/g75gqs1KQrdANiUh59jQAvIjiKADIlaBSzYjZ62GUzB1DlXjthjbwkFPXzix8UQOyIIf9APVZ2Gcri/L5ldCotVsYHZ85D/W3wN/uxYNpDbah7825ZYUM21jP9PsaaULWHcchZLrwTUYJuyYgQdKNeBw6FAUTpJykdvoCFKg12C+Rka0RpKAooiy5hOlLP7yam+U/z0Ua8LHl/I3mWF+iVDSGfRpbKSzngjTvL8ngl7IwYkPxOgt6uXP/EsHPL3/CPCDNO6dEsYlNCu62sgs0qLzKCmYV8M7WeT4kxmhxYQah93NrqJbJND+CH1FOfFDH0Sp2lQb+7oyFk2WGJpxzGeJeBouZ1JGQef11KuyDPwLlesywMnaPThAX1+/UG6yiHVjgULguwguPcXo JQuEcAc/Y/bFKLSlo9P/gJYq X-Forefront-PRVS: 03008837BD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0201MB1899; 23:iC8Q9AtwqoZR8o5g9yLtkGovtlR+Zs//bre5oZ8?= =?us-ascii?Q?quqFAr9W0612yUn+QuX8ATy403ST0ehiWOiv5+Ju5i20yLl5+2/VQelyAWv1?= =?us-ascii?Q?xMvpHDmHFhS0qqNhCr9GB6j77QdKLjiAU1lBl7vVc111kEVUtln6/o5x4rel?= =?us-ascii?Q?fNVEGBVaqOvZycFWMNXGJwhZPjDEdHsB2hy40AROC5T5rk7ap+9SU3ZCrN8d?= =?us-ascii?Q?Siq7EpBnbVSp1ZwEI4bFCcH4GOPhMFEIhsZ8zpaCkBcy3q2Yiktfe2CRtX8L?= =?us-ascii?Q?E7ttk79UqFZDKJQQvAVh5nO6eaSPU3CxDUSajKx2dZjZLtPYG+9pl9MEzsEX?= =?us-ascii?Q?mlwmg+aienr7GEHAvr80TYWcA9P2MgbEJ+ixFBLwUzv52Z38b4wYPWfP4Aqs?= =?us-ascii?Q?iGZcKO+mWP2yb9MI0jL6WklUfW+tn9EL/lPkCuDNH2fFwqs9Srzul/zlp+LQ?= =?us-ascii?Q?ak0skzVP4/0s44VwzlTaKR/A7BlPfolA5K+zLjshndChf9rRFjH8lrW5XcPX?= =?us-ascii?Q?s1vCYaI+vFboK743fu50pEJpDGbEoAaLLfF9KaYVDowQz4aDLx6RegAI0Lh+?= =?us-ascii?Q?1hpou98brvRGZ3W9hKIvWbOPt8fAx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NiJ716ZCYZQJfpy+V+XQz1UgIcNnl9KpjCMOX6c2eajbCaNAhWK6qpOAt15BS5CJVxKN4tP5IHXVwXFiMLsOQaXqa8lB+6WWFa5ibfk+ASRIXs2ESdQ4kZ4xGOZXRRxNHHmC6w/emojnWbN4iOzc8X10w=; 5:x5k/PyV0Sy3xYzvzVtKlZxmz/j0G6CdHPuiDx77Hp3jOK528LwKIqkXKNfNy4ZShuMOfeTlo14FOHRE1aBgRxbm2aJtEnIdueXFoyNdvLA+ph5crDAVCMeU4PtpARgjcZuHD0eme0a1K4LuANnsjxQ==; 24:KZKh53HKW0v3c6+imlDvTfT2Av6jwo7AJrVuHDhI4EL+Zpk5i1ksOoNfjxOsrD7pjlDZssnCaqD8dEedxLU4+mRmn6l8sWcrrUWfy3FuENA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0201MB1899; 7:mAvfs575cN5fpdTk9AqGWrzOxQ8GfR2Fl744Xhrp3ZfDzY3slmLTBt+o2i/HDV5bFHCJqcroI1hQdQ/JYgVZGQaXMEe9y3enVpSplewOsGCRnXpRaxoK32Nh7mt9hY2XHsmTtDSZJENPevObibipp2RqGlP3pXVsC2beipsW+pojE0at06UTR4Mv4V0RUBxK1K3Vdl6n1zlkEi1rhNAFlVHtKNODoADLABaOQ0qcQD4NDh6Ei45O+0RWWTrK1JSmEcOuhmdCqtEfRqasAGoZQ3QBVq8RaXbTxJICyUtU6S8O9jxILNkdAqDejYlt+rNry7l7/QoqxPkr2JcJ6bUjZQ== X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2017 03:18:59.1830 (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: CY1PR0201MB1899 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 Make sure that IOP and SOFT reset are enabled for both for both arc and hba1000 controllers. Signed-off-by: Raghava Aditya Renukunta --- drivers/scsi/aacraid/linit.c | 77 +++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 3dea438..d933d2f 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -828,6 +828,11 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) u32 bus, cid; int ret = FAILED; int status = 0; + __le32 supported_options2 = 0; + bool is_mu_reset; + bool is_ignore_reset; + bool is_doorbell_reset; + bus = aac_logical_to_phys(scmd_channel(cmd)); cid = scmd_id(cmd); @@ -900,9 +905,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) msleep(1000); } - if (ret != SUCCESS) - pr_err("%s: Host adapter reset request timed out\n", - AAC_DRIVERNAME); + if (ret == SUCCESS) + goto out; + } else { /* Mark the assoc. FIB to not complete, eh handler does this */ @@ -918,44 +923,42 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) cmd->SCp.phase = AAC_OWNER_ERROR_HANDLER; } } + } - pr_err("%s: Host adapter reset request. SCSI hang ?\n", - AAC_DRIVERNAME); + pr_err("%s: Host adapter reset request. SCSI hang ?\n", AAC_DRIVERNAME); + + /* + * Check the health of the controller + */ + status = aac_adapter_check_health(aac); + if (status) + dev_err(&aac->pdev->dev, "Adapter health - %d\n", status); + + count = get_num_of_incomplete_fibs(aac); + if (count == 0) + return SUCCESS; - /* - * Check the health of the controller - */ - status = aac_adapter_check_health(aac); - if (status) - dev_err(&aac->pdev->dev, "Adapter health - %d\n", - status); - - count = get_num_of_incomplete_fibs(aac); - if (count == 0) - return SUCCESS; - - /* - * This adapter needs a blind reset, only do so for - * Adapters that support a register, instead of a commanded, - * reset. - */ - if (((aac->supplement_adapter_info.supported_options2 & - AAC_OPTION_MU_RESET) || - (aac->supplement_adapter_info.supported_options2 & - AAC_OPTION_DOORBELL_RESET)) && - aac_check_reset && - ((aac_check_reset != 1) || - !(aac->supplement_adapter_info.supported_options2 & - AAC_OPTION_IGNORE_RESET))) { - /* Bypass wait for command quiesce */ - aac_reset_adapter(aac, 2, IOP_HWSOFT_RESET); - } - ret = SUCCESS; - } /* - * Cause an immediate retry of the command with a ten second delay - * after successful tur + * Check if reset is supported by the firmware */ + supported_options2 = aac->supplement_adapter_info.supported_options2; + is_mu_reset = supported_options2 & AAC_OPTION_MU_RESET; + is_doorbell_reset = supported_options2 & AAC_OPTION_DOORBELL_RESET; + is_ignore_reset = supported_options2 & AAC_OPTION_IGNORE_RESET; + /* + * This adapter needs a blind reset, only do so for + * Adapters that support a register, instead of a commanded, + * reset. + */ + if ((is_mu_reset || is_doorbell_reset) + && aac_check_reset + && (aac_check_reset != -1 || !is_ignore_reset)) { + /* Bypass wait for command quiesce */ + aac_reset_adapter(aac, 2, IOP_HWSOFT_RESET); + } + ret = SUCCESS; + +out: return ret; }