From patchwork Tue Mar 20 05:58:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10296449 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 A1EAD600F6 for ; Tue, 20 Mar 2018 05:59:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9121128AFD for ; Tue, 20 Mar 2018 05:59:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 859CC2951B; Tue, 20 Mar 2018 05:59:20 +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 0B87929516 for ; Tue, 20 Mar 2018 05:59:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751770AbeCTF7S (ORCPT ); Tue, 20 Mar 2018 01:59:18 -0400 Received: from mail-sn1nam01on0051.outbound.protection.outlook.com ([104.47.32.51]:16352 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751747AbeCTF7I (ORCPT ); Tue, 20 Mar 2018 01:59:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B6aCbTXeLYFYi26a2iihZ+8vXRA6zGZknxZEvRuGDmA=; b=krHPHgwbD+W8aLfDFl7Nt+Sxydd/C2Wz5uS1w73XSY1wKFyIq0n11RiMfzRNz536AA2N59/USU5QBxjgiA1z3nO7CRNyEmGbEZkWPq760T+ndxLdgneTci/bpu3N/iEjNKSqerMzwBC4MSWY8AOeHle6T3W7Nut4jG4vIcyPnns= Received: from DM5PR07CA0119.namprd07.prod.outlook.com (52.132.138.48) by BY2PR0701MB2086.namprd07.prod.outlook.com (10.163.156.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 05:59:06 +0000 Received: from BL2FFO11FD022.protection.gbl (2a01:111:f400:7c09::137) by DM5PR07CA0119.outlook.office365.com (2603:10b6:4:ae::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.588.14 via Frontend Transport; Tue, 20 Mar 2018 05:59:06 +0000 Authentication-Results: spf=fail (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=cavium.com; Received-SPF: Fail (protection.outlook.com: domain of cavium.com does not designate 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD022.mail.protection.outlook.com (10.173.161.101) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.527.18 via Frontend Transport; Tue, 20 Mar 2018 05:59:06 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Mon, 19 Mar 2018 22:58:41 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id w2K5wd24005317; Mon, 19 Mar 2018 22:58:39 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w2K5wdYP005316; Mon, 19 Mar 2018 22:58:39 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 09/13] qla2xxx: Fix retry for PRLI RJT with reason of BUSY Date: Mon, 19 Mar 2018 22:58:33 -0700 Message-ID: <20180320055837.5246-10-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180320055837.5246-1-himanshu.madhani@cavium.com> References: <20180320055837.5246-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39860400002)(39380400002)(346002)(376002)(396003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(76176011)(186003)(69596002)(86362001)(316002)(50466002)(575784001)(54906003)(80596001)(5660300001)(48376002)(4326008)(106466001)(1076002)(356003)(85426001)(110136005)(305945005)(16586007)(336012)(42186006)(81156014)(105606002)(6666003)(50226002)(36756003)(81166006)(51416003)(87636003)(8676002)(26005)(47776003)(2906002)(8936002)(478600001)(72206003)(2950100002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0701MB2086; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD022; 1:S+CXmzJxx8FfwjuG266tz5mKEwnx99Mqjk3RWGwumq+YV0uSHCh6FpcGIy64/bZQmM53LItNgnTcY7/PPpPfkvrFn7zPq9ntvGPj+LdD7c7mmGALOPpN6LfzW3puFot0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ef4b489-2164-4a7e-793f-08d58e27b0cd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:BY2PR0701MB2086; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2086; 3:Cy3bu2H+cnc6pBxKjnT3sr84WKCWitJjjjxV1AC/++LUXrI4a2gB1C+t0M644o+kJeqYlQxly6d79oh91u9ynJAzB54IwW89W13+Yup18yNCsPgldTKsrkSAEwtU+CxgS0XAEDZbHN3q2Tk73/O1n/cl0205QgW4zYbcq17ZKF1ALXGlt49J8rtrOUMdLc2xe+iArbbY/FsWEfB591EtA77s2sFalx2WJIfshojwV7S2/M9/G+kvL/65JwVF/NZuk2WPvXB2R5pwC3eA5YHBrz2ZRlz+vPbYYnx0EEUfbsodMCL/8CXwaqy48ieDjPBrpQsoM9OJoSykLCtGfFORYg8KUnMKlCl9dO9eSznY9A0=; 25:l9hokD9dNQFpBlkTPV0TTJ6qMle/jvYbe7vOg880EUCTwk64MkYJ8Esv0mz+7vAeMBzenrvPd+yaY8FzEs6kUbtEBQy5q2uyWFhTbZ1dgvD/Tn8Aqe1fW6ra3Xw53B7vzsk2kvC4j5DkvoEm/3Fb6yUmg9W764ZptUrV/qhIEx4PaoKiruiK8oUBaDRc3oU451vzLocJXxTBAN/VJvUn7yp2Rwqwy0uOWnuYJ4cWTPQRsSuHBBsxd0lNEi03vykRqZnqMSw1LbtHuGpb8UgL5y4N4GEUBdV50EKy6AolWbZUzJovdtDBCA4+h4o4XjNC8wvAAZU7Ncu+fPRKLfDY9A== X-MS-TrafficTypeDiagnostic: BY2PR0701MB2086: X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2086; 31:9RLcAHyxdp2WQdJHVsWAMsj0E4X75wTnDBjGzEoJXH++LrFafj6Ucl95ml4q/iomc9GmZxbwJPbRHN6umImhK1cpRNuWCUGvfIniGZCe4PVUln4mlr0S7Hb52cFAniBJau36MUdfXjSB5Wp/XUKIv+ZH8UonpOsZDOyRkYWD51RYdMxCCOTEnalWBURFSMZpIk/pLi6GYMk1YNWCB0aU3XcNHjiOHku95lyxwDLgod0=; 20:5oqT4MsuT6ohZ+Q0vWOSMxj5VGRHcwzRvervN9Ej1BVh7puTNBNmiCy2OIgACnvOZFO6mOWyACSExVCCEE587TJypO2QRZQ6NBXkaNAsAMxgo3QP16BMxGDn1UWR5ZCVqZrx1yAwpXMBd5DbMR712/WIUW0k7PRb9me/Bfp93QsaLzMr2+vHCpIchqfDCupcs1nDFqZfENXXACB40eGRwiqmwnjydgs7ljsw7TOU+xfTs6l3lhopkkFL8hRhtTgCO2bS+pCCQBKlhGYvl9kVlmEnzVFHMSEK/oE696+9j5rzEB1TYlswHU2OpmkpIwbxuVKGtI1LPn6v6KXR4jOvhtnDkED3qYl9fnVspBrNnYGqlVYJcTSdgb6Ry96LBVlHG047iq+/EOIrqesgMe/eJMZ1GoVu4iYFqk2fxBOqDuSTy49BReWKz0Enp5whjsAFWf0W+TXvqW50gSxZoQwyTrZRZXN2Oh6/eUK6ysv+TQStF7wOQ0qulDRYrq1UW3Zb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231221)(944501244)(52105095)(10201501046)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:BY2PR0701MB2086; BCL:0; PCL:0; RULEID:; SRVR:BY2PR0701MB2086; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2086; 4:9+u/wCIXrQs5WHuzg3oUwHUzqRHNNcDaUHrg5LHQfKiQHaclpUTamKPzJzg40Z9uCU4IOXr1RAKxl4Od0bQoGpKH24fk7DAN2e0/ulQUw5f8AbGJxYU22KJp/PrS4hT3og5Nd7x6LGTZEglVAw+i3q80xZmiS94yNMF5lNGJxRcamb3MLN5SjvH/hkLwjxfdrvnKj5EPt23gGgnAfXcDcBy2S9Qo9BTSfjZT5Bn4Ik45aOpNk+lRDfj/73ebD0rP6QG4pUfckknOSqKZ8FIK7Q== X-Forefront-PRVS: 061725F016 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR0701MB2086; 23:B5Z3vZeAXdr+yaQWZAZPujMSPNs7LUYbz3kqW5g?= =?us-ascii?Q?W4tB5Er4DApALPUV63KOzE1GyntT6cgrB82MShrMt36pNP78ZbedY0IINci6?= =?us-ascii?Q?mTGvdRmvkSWofipmcwvJnD0P7aAAfC3c7QtR1bn+r3ftlLPybRMG9Dlr6tkj?= =?us-ascii?Q?YpfxLzU4C/yI3tmuG94WXSg2Tih5bXHU9APBqLD1zseu+AHYJWOIB1Xs4F/8?= =?us-ascii?Q?FR3DtWvrNaZX+kvBcnKOcGBcvEsesr1P3zq5qRKsnycRUhYuIx7jGafMYMj7?= =?us-ascii?Q?smbtTpUo3CZMzyT15qErxWOcvF/n461G4hu4Af+SP4O+hMg6WWmk6E/ElA/r?= =?us-ascii?Q?CTwe2wK8Wd5yhMKg7KfV7RnZZPmsBHT4tn6x4FwJmYhj9IUP2h8Rmo2DZoD/?= =?us-ascii?Q?3PDKe/mDLJH7WxA7TK6VDGbYhdZua51dfhOUmtxTkcVyqgONBOlZpw0tz8O/?= =?us-ascii?Q?EqmZK6R9iFJB7/3lFSuIAdU5OJY8x8F0L6M+TFEimOK3/xoCGDm4IQvRk4Mf?= =?us-ascii?Q?KcvD3wGeckbjWjUMXBPTwh8gf5rfKdRbX0okEy3ki/RlDoS989KOWa8JHb92?= =?us-ascii?Q?A3vYEzDvujnbiSPPev1zd5Dfvcu//2D9TwiFrdv5IkAqfbEzzhm4mDRKLYB9?= =?us-ascii?Q?8KZCvdYHuLcUbsdIbkro0DQUcvHN5S6M/AnNnaeeoSxdADKHU4rA9OUW8xzv?= =?us-ascii?Q?QK0kP3eSWmX9L0hDRtTk0FpYwMaJWAMuDOUY3q569esAx/DPW/T+2WfAWBDv?= =?us-ascii?Q?8N5U0g7KBQaPkt1wW983jDLvEa5h+2o9BOaog/Icwn6RpTMxnIdRz+C19ILd?= =?us-ascii?Q?3pNU6Z4t8LJirAgMjnk2gYd0Zro+aeS1cJUq/dFJVBU5BqtTkDUpZPrq6wdA?= =?us-ascii?Q?6VLAHkOJrSI/C2IOrcomJ5+QC8+wea8XQasxrNzu375gPA1PgbK3+M6AiGrD?= =?us-ascii?Q?9s6Xxjnw8K0gH2j23NaXLewtXRKeGp2GbB92M96fw3CNQU7ovFZxY+BIIKzw?= =?us-ascii?Q?cXRLAJd7XratlHBRDIQL9V4PNX9JCg36M1UKpDy8nASq+/vim/U5UK6lbTkW?= =?us-ascii?Q?rZB+zNwUmN+86bP+GOG6fRWjBjLDlCqsDQkle3yFraYN9W4PlymgEQskdYTw?= =?us-ascii?Q?3Bao/+veLQW3MgpBCsden6EBTS9bkQJ6i?= X-Microsoft-Antispam-Message-Info: ORD7L6/q8F7YJZKixYAXUtYZuYL5IDslwryNNAM8vZalpxp+Clo7+dfK/isH/gEwqcqUIM8sHQKQywiRi5joCw3xuWriOahEuIri2+hDcywvWvPGomUPYc+0mc9sMHfd9xICDNR6hQWOWoW6q5pShXFTXtVgfhWe1SshFrCx0+bInvGUA9CFgW5kf1m+OEBL X-Microsoft-Exchange-Diagnostics: 1; BY2PR0701MB2086; 6:XqBldHCTfFqWP8t9Ef/89P592SEknzxxvhSE1oDqYrPSN1S7ebVMQic1hHnYpKlw2M9UzihO9xy0ejXKfmVLyogfNujRdkp90fQFz//4vOSK1p1WnNxluziTxXwoYjxWrz9V5JvuWY1v7lUwYPE9vq+fboNgQ4A1XvIvEpdORRW1dlg2fmP6pgJjAXQPjVXIcb6otzK2PlKfUdEtU3vWV7yDU6PFvE7gKv0I61Jh+YxjYFuK/NfXktfY1VPki4k1fySKmQFngGQ5vKN+rkHzJ8a6tpYHZQAHuHuMSOlUQxWc0Rl4YlvmBiPQJC7Wa2hSonNMERo/SDNc+fSibMaJBb4bHY4AjniLRu9hN1J5wYg=; 5:48NpL1FLzKvqDOe2V0bFv7IjEWchZ8Dj0jo8GJ4TcpqY0roLz6hIhoR4YhXafkfaBh4Dp4O+wXmYwucgkEnOrBkAljNOPxl/4XT/4nCAN2kE/8glfg/me4bFUOgXVuCeEn4YfitfGe7sM4WQf5o3rCpIyVFAcfwziSRGblncKTs=; 24:ktwiYfZFoaehibJ6ebf+RWYRTKHn7w4bNqcQ7bC12IBKS4zPe1I+sRz7ex05+8v8dMtyYiNM1pvS47hMy49us9Y57UwPWVc8CzlsCdkpD/c=; 7:aPce+N99hnc5/22o1QtZjrgusxt2GYHqNTX/f3zLXRlANjuzCfSE/CuzF8G83ki/6gkOQU9YDErXH5nGGtfEqEnggFuLvRRCJnckjUi0v7SsHTzKRQ8LOmSe6IiIAuO0hB0qZbiHBHLnPQzaKrJjMxLcKXPAky8XhbprOVngenDn9eSeG3G8ooRQmbz6aYQPXyLpkaUmJaI3ljlzVc+FqHuly0y2c5TdDEE9SsQYS88uCLezDOtpIfzR3F7i8UdF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2018 05:59:06.0329 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ef4b489-2164-4a7e-793f-08d58e27b0cd X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0701MB2086 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 From: Darren Trapp Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_dbg.c | 2 +- drivers/scsi/qla2xxx/qla_init.c | 13 ++++++++++++- drivers/scsi/qla2xxx/qla_mbx.c | 7 +++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 7e9d8f08b9d5..1abc8a9064b3 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c @@ -60,7 +60,7 @@ * | | | 0xb13c-0xb140 | * | | | 0xb149 | * | MultiQ | 0xc010 | | - * | Misc | 0xd302 | 0xd031-0xd0ff | + * | Misc | 0xd303 | 0xd031-0xd0ff | * | | | 0xd101-0xd1fe | * | | | 0xd214-0xd2fe | * | Target Mode | 0xe081 | | diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 33823d74c782..15a96dc205d0 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -880,7 +880,6 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport) return rval; if (fcport->fw_login_state == DSC_LS_PLOGI_PEND || - fcport->fw_login_state == DSC_LS_PLOGI_COMP || fcport->fw_login_state == DSC_LS_PRLI_PEND) return rval; @@ -1238,6 +1237,11 @@ int qla24xx_fcport_handle_login(struct scsi_qla_host *vha, fc_port_t *fcport) qla2x00_post_async_adisc_work(vha, fcport, data); break; + case DSC_LOGIN_PEND: + if (fcport->fw_login_state == DSC_LS_PLOGI_COMP) + qla24xx_post_prli_work(vha, fcport); + break; + default: break; } @@ -1640,6 +1644,13 @@ qla24xx_handle_prli_done_event(struct scsi_qla_host *vha, struct event_arg *ea) qla24xx_post_gpdb_work(vha, ea->fcport, 0); break; default: + if ((ea->iop[0] == LSC_SCODE_ELS_REJECT) && + (ea->iop[1] == 0x50000)) { /* reson 5=busy expl:0x0 */ + set_bit(RELOGIN_NEEDED, &vha->dpc_flags); + ea->fcport->fw_login_state = DSC_LS_PLOGI_COMP; + break; + } + if (ea->fcport->n2n_flag) { ql_dbg(ql_dbg_disc, vha, 0x2118, "%s %d %8phC post fc4 prli\n", diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 735079ba691c..c9a134ae0d2b 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -1025,9 +1025,12 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha) * FW supports nvme and driver load parameter requested nvme. * BIT 26 of fw_attributes indicates NVMe support. */ - if ((ha->fw_attributes_h & 0x400) && ql2xnvmeenable) + if ((ha->fw_attributes_h & 0x400) && ql2xnvmeenable) { vha->flags.nvme_enabled = 1; - + ql_log(ql_log_info, vha, 0xd302, + "%s: FC-NVMe is Enabled (0x%x)\n", + __func__, ha->fw_attributes_h); + } } if (IS_QLA27XX(ha)) {