From patchwork Mon Mar 12 18:16:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10276957 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 25C5A602BD for ; Mon, 12 Mar 2018 18:17:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FFC028E53 for ; Mon, 12 Mar 2018 18:17:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04C4F28E73; Mon, 12 Mar 2018 18:17:26 +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 4CF0128E53 for ; Mon, 12 Mar 2018 18:17:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932822AbeCLSRY (ORCPT ); Mon, 12 Mar 2018 14:17:24 -0400 Received: from mail-co1nam03on0070.outbound.protection.outlook.com ([104.47.40.70]:6608 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932696AbeCLSRR (ORCPT ); Mon, 12 Mar 2018 14:17:17 -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=Hllo9wMUKiqkqMLUY57FabxxlwwQl5jZcCIeQ6Uauiw=; b=bbT4eeyNlnBTehAPgnL4WpbvpKM+Jh+eSeh7T1VkTAoIurabCvPFHyV6WlZPMWVgLy7erMMG8o2/Mndmax5IDCafuiq4qdUPTIxFsknlEUXakfq2nDtD99LGCuS68jYUYVxf/kgR2hV+c/L0V7znSzqrfbyBskTVfW3TYB2Bma8= Received: from DM5PR07CA0115.namprd07.prod.outlook.com (2603:10b6:4:ae::44) by SN6PR07MB4303.namprd07.prod.outlook.com (2603:10b6:805:55::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Mon, 12 Mar 2018 18:17:07 +0000 Received: from BL2FFO11OLC012.protection.gbl (2a01:111:f400:7c09::142) by DM5PR07CA0115.outlook.office365.com (2603:10b6:4:ae::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.567.14 via Frontend Transport; Mon, 12 Mar 2018 18:17:07 +0000 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 BL2FFO11OLC012.mail.protection.outlook.com (10.173.160.159) 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; Mon, 12 Mar 2018 18:17: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, 12 Mar 2018 11:16:53 -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 w2CIGr2O020775; Mon, 12 Mar 2018 11:16:53 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w2CIGrRa020774; Mon, 12 Mar 2018 11:16:53 -0700 From: Himanshu Madhani To: , , , , CC: , Subject: [PATCH 09/13] qla2xxx: Fix retry for PRLI RJT with reason of BUSY Date: Mon, 12 Mar 2018 11:16:46 -0700 Message-ID: <20180312181650.20704-10-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180312181650.20704-1-himanshu.madhani@cavium.com> References: <20180312181650.20704-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)(39380400002)(396003)(376002)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(105606002)(356003)(47776003)(305945005)(1076002)(6346003)(26005)(186003)(16586007)(42186006)(316002)(110136005)(54906003)(2906002)(2950100002)(6666003)(69596002)(80596001)(36756003)(76176011)(81156014)(51416003)(81166006)(48376002)(478600001)(86362001)(575784001)(87636003)(2201001)(336012)(72206003)(50466002)(8676002)(50226002)(5660300001)(8936002)(4326008)(106466001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR07MB4303; 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; BL2FFO11OLC012; 1:1nJvzzeC/gsp2M4KHmGCBHQjYWtRIbPhrRs0gfg7XTLh1KymuZc+BzTimRZzoY1jUHf6DfEL09uC1s0NNntXOeGFdGwbREUnup+sbvswkUYH1KDJ8kbJ6BmQjJNzuygv X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d89b20b5-6e00-49ac-6855-08d5884576c1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:SN6PR07MB4303; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4303; 3:brnp6JpnGKG83D6R30C6K7oIdkRSoIqPvgAfVsd35X1IAgWwObOwxwWOZNAckslDyTqp+B5w+TYRVHw/RCqhVL9jXFvb/nT89kR4sKhWqu3jweQU0drPx4Z3Lj9wWIuyHBZmsfghO9cfHj2PoZWHrU6bFSy6N+JlvPLzkRrdTaWnkE3bO9TZBobM4A8yl+o2xRZyIHg4DlS9MfjaBFWPZoWbqiGjCiNuSdPITWvvgbCsWwkcRTANz7Wvaef+T5nWDyjy5vmA+jSa1xDLOWd7f+n3NSmdOE7dS36R/XtDW7Q4H/13ZLacSbA+Og3ntEO7fZkCft/j14c4RYlas1YiE7VjY1sgy1t7jzqFm3MqWY8=; 25:7IiEmM55rGtiH6ByUW2QoV27w2IwdYBtZvFF1LzNrleas0bBl52ffPqC8mFHwMuHtUN95/BzHkNzR2Wt4u+axdmFrjHoYSVs5KNupMHIHekyCLVLaz7rGPCcWvz5AsKqRIQH7xo90NbiXKu9GZ8QhmnCK2dXIp3Rb7b8pgyRJohsH1PKhOlsVNntiiodFoIRepgkhF7jVlK/CROuPNTE0cd8yHV3cmP/Un5PKG+i/zu6HzvGQukYrZqQmSEGKDBuzzT8w6WJJiposTdGih72q4V/Xl2YomXj5mRriVrnYkJQUGzYZUl71dRXCTnM01xLwC3v4ElGtvW6TthMaQDv+g== X-MS-TrafficTypeDiagnostic: SN6PR07MB4303: X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4303; 31:U9o3QsYOD1ocVH+59ypYdrvHkoTbmQAymeOqeIC2qLf48BpaGWFAfjUK6HMYxl+8KEISH0nKxuDB0dOQeBVCqoRDif7iIGa5ynrnjVZmF38js/UNcX/EhaAXZzIx3SVTz5mQ1yJ/00oJBL4TSILYCnRWRzX8LnuiLndOH9JzQkOTj+9CmxtA2vk09fZ4FY0TqJemeXBaEn/HW/vSSlS/8UlQ9KLX20+PnkYFhP76ul4=; 20:l02PeF4WI24ANm3ca2zWkStjNOi6gM/i1nIAmKEboQ47ywEgVCe87TmuyvLkcBS4Avc2qufz+emSdbqxspN+KF8Qh8msTaMx8wf7JfajFdDlxq3pOePrQL+frLwW78XiDFCmoKfaaCXLU/FON5+tPGyDAZJ1q5TXs4dqaEe/NnQtBzCV5OZbISd/R9yTrQju4i9dH9gr28KTq3TcyNjuAhs8luaff1J9fh41TZ6J2HGktaNTzd2bEF38DR/NrUs1AQO35/cnIl9fva9Ko9p4sj8f27uOVx8QUSByuJYQe7frlSOSO+MYkaWmzGlbegvHeqfBizrvV9YQzG40fRwcKkHfQKh4lvggnJ6Zm7rdv9zKws0j/j+8dyo/eOk4IlaW3V7RgJRp/JQBVCmzyk0cdcCWkVfRah8yrw+HiMOgSKclS+sQMdhSRFzxK6OubC++B8c9JTxrX+mAWU4v84/GI/MtQq01My0WWQeZG7WqtLTGZSHNLDyN+2E/YuEgSfxQ 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)(3002001)(93006095)(93001095)(10201501046)(3231220)(944501244)(52105095)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:SN6PR07MB4303; BCL:0; PCL:0; RULEID:; SRVR:SN6PR07MB4303; X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4303; 4:UjvL66mIx5ul2NQO3ApyI4ZXnqTPA2JM0+1ABaUfgUvltz+04eRDAlV0ItM2cuJM3s+4HSbSZCpV0dyjlfvb8e3vVstt9YvjtwlnX4KUv+VJ3AcgW4cnQ+JfKbGwNd97KtOyRFkgDSupicR2TgoVHCLg5evrldsVVLgny9g5tMW+Scl3BWkVg3hpzPonLUYfMUPE4JORx1+QtKzaAgf98Yo8I2ZAhnkhFekNqkJdcrKWLcAeNHEVWd0CIJx61PrUjbjVAqJKsz6Y7KTlQNp6EQ== X-Forefront-PRVS: 06098A2863 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR07MB4303; 23:Qfk47XwlFZtO+onC9OjyBg8EJzALr0x6NalknkpZP?= =?us-ascii?Q?DuzSkMFQsgHJlUt9soiqvoQR1bfxxQ5leJtpQKqC+Tpgl9I9rGcwof4QVSCZ?= =?us-ascii?Q?eBDpLcGo4k6PLp0YUQ5Dx98kIfY62hmO7TSq+FiNWJbf0ssIl1tcSuGSDByY?= =?us-ascii?Q?g8RjnVGIYXPe9XGsgrwdkbBx+jwld16iUz7/oyLrxemeoKttZNw9MH14cjTB?= =?us-ascii?Q?AJdyg6wk83VZiRn9XyQlsklnrfhlAm7GsXLT5tjW4g7qectiS4yCKm9GF6PF?= =?us-ascii?Q?8reduj0aMdXOYaoJDqW9HKgnH6b9nUIrwZMVy8QfA6dlH0chlPq7pg/qSQHh?= =?us-ascii?Q?+nmxoJ11iFLcIC4BJnCyyK9H1QFCQp5Uk+PDN0LXW3SsY/TaL9OTqJ1OmdWo?= =?us-ascii?Q?DC90Dywe8y7T3Gou0sGy+TkVhUmDOB9GySv6kH2fxnfPx50zGmAK1zo/+wq8?= =?us-ascii?Q?Hl6lAfwm7qbekQTEhcxgkgdOaz95teymQpuQw+eu5QBi2pNbG3MgN8BiN28H?= =?us-ascii?Q?LV/RBly4d7WIveNwzbNGvtPkSWqTbtFFUTbY9CxvbW5bFANJa5Et3N6relMf?= =?us-ascii?Q?BpFUZJdVDCRT9Tm7kkHB1pMUsVIcHxOW1KSm4V/x5TahZB/53KUDwrCEzjdk?= =?us-ascii?Q?3Bt6PmTvEb1fENFCjlVuE73tvC5ItqmEOUoUpTzB/tdA8r6u6iEo7gbYOrug?= =?us-ascii?Q?nkLhiF9VwGPTfJMrBl4s2wCZoQQAXtwnVw94JTs4imcECxrV7TDoMxZIHIxm?= =?us-ascii?Q?7TIJc59exL4eTPjSZnTXsgUzXED3NgiCwCBt5kcAQZX/F6ggIKHR7hP2R5bs?= =?us-ascii?Q?ho8hq81HgDx7ocKkpSnGdEcjTWiENbMaWwxCYeEU5Fa1HoSv/vYfEEkBOt8N?= =?us-ascii?Q?DpOEYVCVNJv2L4jxEoMJgzNN3VtpOdMxBskf1SSGMa5mO1uaoCx+sXu0essb?= =?us-ascii?Q?is9da83Qw8MAo88gi8UqVYUsrNGacCCcqJjD54G3g1LLkmG10DvJSMJjgD6A?= =?us-ascii?Q?uBHU9/X59sinCPa70uwJImG/9VJJGECTj83U6ywu/CFGU/DzLb78sps0HNwN?= =?us-ascii?Q?jdwWosVzE0hXk73jqmq94CMwadto7ltpctLtA2TGNuT5ZJT9QE2uB8letmpB?= =?us-ascii?Q?JlRTe6qd3ehRPe7jh9HBX/nexfBfTBv9xLCcfkNYRlLmHnugpLMVw=3D=3D?= X-Microsoft-Antispam-Message-Info: iqGGf33cL+q+M3CAmtz4DjFLPNUFAKO7K1rghIXata0xFQF6xjw3eT/SD4MYdsF/JUQL4+ARYN6d8j2QC2XnTG68tJColCKBKESK+K/nrGu63CL0yAH9VSIbKvsOjDJOcSw2BikNJf/AiJqN6Crpjx7hmi1AkezeL2w93xh/IPgK7kraRwwJ2hB7FSklTYHS X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4303; 6:aGQuU88wi6Ua8NJOiFbnUn1PJZEHPQlFz/ZBFilUblRliEHkBlyqlTMfGlvUzUyqwREdV8FvHyk5dxkzJEC3+SvpO2Daj/QVJI4yaFl0+QGmpHAfs59/ZC5TtloVU5QmQ45Ckb+fhFcHfwRNwTR4V8YiMrF4CmPMjoLRaX0i735CJWeJ4WhcoCkonUz49WPC3LYsapf7EBqzRy617bS4oUj7xxCqetFbfvWeJXsBPnPkvHQp0gdqSRQhMotF98tzImsO3o8aWpFtOda08Nh8Bbvd/XO2x/ienZVU9O0/fsp+NhDWyZuOE4qlPlnsaTfZdOkFOOa76vLa8CiL6F1BSDVaINyShQphzm6P966LXWw=; 5:HudAUcfT1oTjMLyxFXaiLLWzr9NZK1/yK195f0u6rDo61j/Kyq+jTi6/kAcOSF7EpTIeTQUw69d7DW8QUamv7NhUJmyyLD2MRkGkToCW9lEhUvYJvBgZtOO+uf8ndWaG0rsCnslNAVxhlahrB+vEgzdhfSxo6rA1CSFRL1QqSfg=; 24:VG57oo4tuw2+qGfSm2oy3DqUOEwffcH8Qkc4dgLtR7yYC6Ugh6JXpL+TfM15PMw4hMr2sQnmpe+6vtjUn/PZ0iU47qkU9kvP+xhe0gzyWb4=; 7:ylyGRPlVHgQF1MBs0K9Gv8skmNBkrAT8U37PuoftBl7nzl5JsEe8bd1GdtDWEukjExPRpDYepcqNtxlANnP3Jz017uSTRBGG5BGezl61D67ltlf8PJ5+3XzJkdbOadSaRRscpw+FZLkDnIs04s1zOavgLIibSt9M5PpduaVy0EqhKbDmKBJU1U19HqHcwkGp+h0FdaggSuP8TtIzQQ4cCcNLYsEOJw50bHRbVYZDKgzDDYJtmZyBZ6N+6yT1JzAX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2018 18:17:06.5712 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d89b20b5-6e00-49ac-6855-08d5884576c1 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: SN6PR07MB4303 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 --- 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)) {