From patchwork Thu Mar 15 03:35:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10283879 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 9424260291 for ; Thu, 15 Mar 2018 03:35:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8431B287AD for ; Thu, 15 Mar 2018 03:35:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7893728806; Thu, 15 Mar 2018 03:35: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=-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 F3EE0287AD for ; Thu, 15 Mar 2018 03:35:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964AbeCODf1 (ORCPT ); Wed, 14 Mar 2018 23:35:27 -0400 Received: from mail-sn1nam02on0050.outbound.protection.outlook.com ([104.47.36.50]:61152 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751969AbeCODfV (ORCPT ); Wed, 14 Mar 2018 23:35:21 -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=+i7pIbtIKJlonR0Qq+hxz0zgIG7i2J+mqF337735pHk=; b=LkE14FSN+i3fFp2H4WPMkJ71H1u4kggWviBesZpwOgj07b0A/pnYpH7dRhXCpL0TRrZ7evataHI+DA+TusA6A0XNLbReL8KwedxvBnsUdutgSWBBUMIVIdWgFClSWUONg773co6bjfCDlIxkcoGPtHa5PqmZG1OrFntXWP6Va4E= Received: from CO2PR07CA0079.namprd07.prod.outlook.com (2603:10b6:100::47) by BLUPR0701MB2082.namprd07.prod.outlook.com (2a01:111:e400:52f4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Thu, 15 Mar 2018 03:35:18 +0000 Received: from BY2FFO11OLC012.protection.gbl (2a01:111:f400:7c0c::171) by CO2PR07CA0079.outlook.office365.com (2603:10b6:100::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.588.14 via Frontend Transport; Thu, 15 Mar 2018 03:35:17 +0000 Authentication-Results: spf=fail (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; HansenPartnership.com; dkim=none (message not signed) header.d=none;HansenPartnership.com; 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 BY2FFO11OLC012.mail.protection.outlook.com (10.1.15.23) 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; Thu, 15 Mar 2018 03:35:17 +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; Wed, 14 Mar 2018 20:35:07 -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 w2F3Z7uu012699; Wed, 14 Mar 2018 20:35:07 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w2F3Z71P012698; Wed, 14 Mar 2018 20:35:07 -0700 From: Himanshu Madhani To: , , , , CC: , Subject: [PATCH v2 09/13] qla2xxx: Fix retry for PRLI RJT with reason of BUSY Date: Wed, 14 Mar 2018 20:35:00 -0700 Message-ID: <20180315033504.12628-10-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180315033504.12628-1-himanshu.madhani@cavium.com> References: <20180315033504.12628-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)(39850400004)(346002)(396003)(39380400002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(8676002)(72206003)(87636003)(42186006)(50226002)(81166006)(69596002)(16586007)(81156014)(36756003)(316002)(105606002)(76176011)(5660300001)(54906003)(106466001)(336012)(4326008)(80596001)(8936002)(50466002)(2950100002)(86362001)(6666003)(356003)(478600001)(85426001)(47776003)(48376002)(51416003)(575784001)(186003)(2201001)(2906002)(110136005)(1076002)(26005)(305945005)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB2082; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC012; 1:0APviIn7QLHAbzcrLKQTkYRyTB3vhuVTrvNlz+zFU3Jk5hfNmivPIHgovRsbtV2EAw4nITWP4xFAm/Tj7Wk+PfaLed93LYBmnPAhR0hKhiW5SPh0UHqciGmJGgzyYHKp X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8c35264f-5d11-49d4-0682-08d58a25c5b8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:BLUPR0701MB2082; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2082; 3:KYv3YGXlLP5ndlx8UnVREkWBSgaNpQbfNJzy2zs1y6P7XYYq6ovHFhsa+TqODVAgvzfq34AKDaqPFsAZVQVWOFSPZMTCxJUJAGPq1Li6dZO2j3bGRpEja9IbQg62RvDTrEsSDZnTYf3fgCvJo9uVBJhrkzOFK9fFNJaRWMI7ReiU+s19dyP2sTNfNfn/H0b0zW+xTiDIMPvMKvoQEawnt0RBKBleIbvl2eEhU0+sebZUTWfzhrbZFPRI+tCXvXr6giRUAvXKh56YqGdJkNilAM7qckbvrpQI7YXI38ET8ZhG8NKbvQnNME2dDGDZD5LZx1p5gNk0ubm74J69U2VuA2qr8LioZO3Q9rA2uznWcl4=; 25:47JWt+DcTztxKDDN5dSBo6zpSXlp0rNhTF0V6gO0zCmGnQcAa+F2PH6FbEfgZ15fMfX+qgbOInHjDWYCvxx4XDwN/tMaT6CQFdEiUJqWRi6210rwvnBBenVhqYyvw/fnLANBkO8LZBq80CQUSyoP3KPdMXu5kEk1UlfROt8/NyXrWc7hCwPmT5AmtZ96zTkqFFF/A3K8qoxEQWAq66cENeNr9oSM1/FUlSQGbAWGzzrWX7aXpukiG/JGWZG4Ew24u1etOznTTjVHKR6XO7Pfjz8hhPFUt9+lkMO8wf/VRvuzJ5HMnfE8LfdQ7f6AtgziXZ9yBf5VJu3GooIgibRoPg== X-MS-TrafficTypeDiagnostic: BLUPR0701MB2082: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2082; 31:SOwAztI6BheD5Y4sPYomciDdjLOz50rkbFZ/9J1/3ZL+xCLvDcYRV5AETrI/laooTG9FQM5khdpXmhCnoDfKfuGctmjwC00zbLM4kNDNduPdv3trMPVM597W5pV7Hix4mSI+ZMsipVE07pMUhKhIZE+8Hc1LhMNJGRmcuYN8TyfIgOzCUXJ8xzXbaKpBno6bD1TUd6li4+WTV4pE+/CroAlw/Px5UWT+69xtzlOWuK8=; 20:zg14nZMctTS6PpUglKzdlbcqO5frYUxRnKsbajN36kzk0baaV75jIKMB0z7bgObDjeEXjNqFUgupPv8votbQX1DL6SdSdFKCGHhcmDKdW6zh3wnvtT0c7ZSyji4Mj3lDRB9cX3YMKTe4hGs1qGxCBznPFDCUXB7V3x1SJyocqL9QGA1+YtbmHh+BH52usk+P2oGG4FmMfuUDucmTzqHV53q/e4JVYFHKTfDqxoT5Hr0rlUgsBr1lvmTxsiO6vgGURdgI/Cm177Pc8pq3uFNrY1QDKWvAJvQv0E8iOaDEbT2yMdrskCBJpl8U77cQRkiHcrfDYEnAGzYrHpJ75xvU9VCwLJGAaUdpEKSgoRrIO2hNqxf7ogh5kLkUUy6VUjPEzJax54LeLgDborewKZ3RtndpZcMUErMZ/rLbXvRNyIbjhPKRyYxn17Ok4YKSzzACj+JWxVhXiVgPjdbM0azRof3U9/bTwyzChYsCTc2R7OkQIYEAKpbSyEQp9s3Jt7GZ 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)(10201501046)(3231221)(944501244)(52105095)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BLUPR0701MB2082; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB2082; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2082; 4:YXvD22yY6JFOGNbs+YjkeFaWftZ8e+zuhAbZrlWKGrP8BU9LDr/kO7qgIf8bSpO3/80LaTtbjkZahjsP0hmZnkJrsdgMQxasb31maiiYbMT8w1xfrdVQhjt32wr5CIaFDBaZwyRYr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us-ascii?Q?s/Sh29jKGscgkaKuOHSVLH5imNz/Lg8Beu9E1n1y47852T/C4YgvGvXDBm7X?= =?us-ascii?Q?a8SUCnRjKsBCL0hfBXOAWI2T//Eud4vJ3Rnu5f2DduC8piTMLA+sla9AMb3y?= =?us-ascii?Q?RKLpVmN/TvjV+InLZuOsR1ughVdxKt+spbAvBZdsqSa48ZdRJD64phVC6adS?= =?us-ascii?Q?prGCuTI7MZF8q+lBNytqr82EjyV3thh5bJKdwNZWqnR1Go/xWolh8EVTsuNd?= =?us-ascii?Q?xs7KoBYJ7LXezux424rICDB6HdChnr0NsUATN+hJVfIdNP/EZdBLRUnIIGJO?= =?us-ascii?Q?gNoJ6CYoXbPTqcyOFYuV+LGqv0UdktH5+b64iZU6VmTU55PxvHTMR5/yFAAg?= =?us-ascii?Q?tPtkfbSL0Hagy7HeGN14iQZ6eZ0vFo484PQxp5+4dxfaageitdiITZebXhl8?= =?us-ascii?Q?plxxCcgVHSDJ4f9CkeAeUb9w0Gd4MA31spOhGG29aVWArlD+RukUtGw=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Antispam-Message-Info: bv7b43L5dtUPIEstnH0uZg3+N2V8l0KiznIYa/MgzqNBlKsPUE/WLVNV7WBFtavzCbCeXrZwYMGDB6OBOqCIthBCFot2RB1Hq0zgcROraFp5U8jX3+xBJDtyn3s3iaMsP/uc0zfUxGzqk36kY2YiqVupR5h4aFd1px/QQLcKouqYeRUkt8n4LHzdgGe4Cjil X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB2082; 6:eOG0MGGh6WxoBhei6+9l+i2Fc3QtMIiT8tY3SL0DSYIBivSkHUfLZD3g/sytKKZjRwCrZvAhlQBy8cNNqHfcZZgcrpjJoj34Vp8+zZJexaHt2tub8R7DATBBtBaksgnTNBMY1qCRwKVqXM8RUHV1sPpdVyCr3qzYvhhYXID1KB76LjKedLGe3oUDm5cMQIzvZKLImkpb3jhPjHswUpxoVxmh3xfZgLTs9/+XT+0ASlgI8AUNbFPgBKi9i6KeEHGOkPX6X4JeQ/bWm/TzK2X5A+xt88wrvQe4sDqWm+8PE3d516pRmYVZbFkHFqeFgd8YSdKdfXmOJ/PETMiPFrhbh7/PsLxu6V64Z6UiheO3QUM=; 5:apY4SLVzL9hfPzohO9xCAm2zeEOFIDZfumlik3tz7Q/ZEQzc6o1f8YzE9pGppm8DET8u30R0m5rg8b3P7l6ht2IQ+YxJt6rW0W/oEWXeeA9pfWFUo+XDOM8VMKUV//UiDDzT7xuNQ0xdNZXeoZxsucheIRlLu5+AKsurdMJBFdk=; 24:LZKanAsSUvWi+YfdHOFY6LLD7TVQE6/nbhwGfLwuJ3a9dyl9vhE7usR1et9KcmR1cb1mwfcj2818a/xOQkQ3Yhj3g43BaZFzlt1FaSbaimM=; 7:JbFsPUzsp1X/BRf2IaAZ5o2tNmip784rxVG60iQwYZZgh/CiCNcufjyd6aQB3thJYxb1X6aa/gWt/2duVD+c++QB5EhgjezQZMOeq0kbHx2RVjD7vHo0U/xyny72FS1Ofqo772QBEoBAAFpUJymvtj6U7N7RHdMsOpO8hFNPa7PXWyx4f8R00yicx2uk67R7NwcwsMfiTk86hWydzikiC9frB0d8bGbQMnHZrYTB5Ane/IgDNgQMCe0FJsroQiF0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Mar 2018 03:35:17.6204 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8c35264f-5d11-49d4-0682-08d58a25c5b8 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: BLUPR0701MB2082 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 0805483645d7..5520477a66d9 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -875,7 +875,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; @@ -1240,6 +1239,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; } @@ -1643,6 +1647,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)) {