From patchwork Mon Mar 12 18:16:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10276941 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 4332E602BD for ; Mon, 12 Mar 2018 18:17:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2CFD628E0A for ; Mon, 12 Mar 2018 18:17:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2198428E71; Mon, 12 Mar 2018 18:17:11 +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 7C3EC28E53 for ; Mon, 12 Mar 2018 18:17:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932751AbeCLSRJ (ORCPT ); Mon, 12 Mar 2018 14:17:09 -0400 Received: from mail-sn1nam01on0052.outbound.protection.outlook.com ([104.47.32.52]:56992 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932744AbeCLSRG (ORCPT ); Mon, 12 Mar 2018 14:17:06 -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=HwuB7OA06HpLZTKzKfv03ApDc6lootqIViizy8daaEY=; b=CQPVJb0qyVxGxhrAjY59XpkfEf8u+K+9KWHb9LZ8uj4ctTez4RmtKRFe4hxm0Yv4LGSlGqwJFsk3RG4R8hVJV2xiSb6nV+LjZ0AUbHfWhklR0G0AjZUjRNN0FnDa+oHkvucZZDrc031X6HlOUuCXzid2zin2k248DQqwbkQHrrk= Received: from DM5PR07CA0042.namprd07.prod.outlook.com (2603:10b6:3:16::28) by BYAPR07MB4296.namprd07.prod.outlook.com (2603:10b6:a02:bf::14) 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:04 +0000 Received: from BL2FFO11OLC007.protection.gbl (2a01:111:f400:7c09::173) by DM5PR07CA0042.outlook.office365.com (2603:10b6:3:16::28) 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:04 +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 BL2FFO11OLC007.mail.protection.outlook.com (10.173.160.142) 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:04 +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:52 -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 w2CIGqdH020763; Mon, 12 Mar 2018 11:16:52 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w2CIGqGZ020762; Mon, 12 Mar 2018 11:16:52 -0700 From: Himanshu Madhani To: , , , , CC: , Subject: [PATCH 06/13] qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change Date: Mon, 12 Mar 2018 11:16:43 -0700 Message-ID: <20180312181650.20704-7-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)(376002)(346002)(396003)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(47776003)(51416003)(54906003)(8676002)(69596002)(80596001)(48376002)(4326008)(76176011)(336012)(42186006)(110136005)(316002)(106466001)(81166006)(81156014)(8936002)(50226002)(1076002)(105606002)(5660300001)(16586007)(575784001)(356003)(36756003)(305945005)(86362001)(26005)(2201001)(2906002)(59450400001)(50466002)(87636003)(478600001)(85426001)(72206003)(2950100002)(186003)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4296; 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; BL2FFO11OLC007; 1:u1xyZLfZN75ypDDSOz0YnrG2EX+Uu9roH0iiLtLrjv0pD4iA970AtV+XRfo720/hQpkBzjxw68baQAQJSLm7T/BOZH8+zQzWwScqcGpeirJnck7MaugQq3qJfiLcZ8aY X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e10d186d-4c2b-4ef1-4a60-08d588457543 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:BYAPR07MB4296; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4296; 3:diYOf8N63LKC6cH29DRo15sytj4f3CoV1cPTbN1606BTiG/qhktKa9HvwfQWF+0OqK0J/250KsOK3J4sM7qA7QGDdZCDhgYfvWoVZGcDofrbB8QJorO9fwbNikhHerDHK8ghTfME1s8+ShCNOR9FGA/VYp8Wdn8QUAgmVR29JtpaZhnRMSvj/NpccnRMOAP/W8HCXauZTzfyxALsIwdTlQ26QRyA6kGPEbogIhvYF6cD5rHLz90lliqp5n/8EVYftYEkJHWbfWO5N9l8ILjW5fGnuO8gn2JHBKUV+Q8+n5xjmAB+t1Kf7UDHsbwrK3p5tfr5/U9ScTzGOqKS3zl4k8jYHz6jE9Vr3uYxQwQXvDM=; 25:J2NiyFLK7eVw1jLc6/wtehYyfQR07clhnLWgAkkJMHIUBpRZFUKzbh2ZjnQXsr5+8ItyBr3m6vltyuW0Tal+fKuY4Ny6hESSuwFHWKR4Q5IhYUVXBcws4u1PkKi9VVO1munkD9W2Y9PLaq8evnGiZxGH+p3lnzs9rT7+hq/YzH0/NUxxDZfi+f4CCLFue2ZSYjVNEkoPSQmWPNAp/UC9d/ARuHtjAYbDyGhvhR63xjCMSJBuaC7uF4SgVaFuedVldMYJXJqFHAdAeFeB7yK2WzgjX3mcrUWGVl3J4ixua+ugeV3FC9OuTLQwoPtZWPifl6fM41JmPNj2foYrmhMlCQ== X-MS-TrafficTypeDiagnostic: BYAPR07MB4296: X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4296; 31:qPZP/Gj6v0XyGhpsnj9/L6VL4/75zY4HybQJ+Fs+8jbAafhqA2YpVgGAlcKS8AK1dIM0hAwprvqi323OXcB+tKbiMYXVX0LZ7onMBEZfoV8BZVgQ6sWgRqjvr72CzyTScrV4qjyPMDkeMa0kdESJ+BJN6ISExlxE0x89MHaQJ3nvQ6FOMWxpLuftIAWYOHGohTI+9Cl2EMhX6yv0E3spXh7rlEYIof9FIRISPwKvOf4=; 20:6sQ5sytS5uCcyf3eizcA/+YNmv00XTwot+/hhiX5wdelUjM8Gu2pKUM5VUs/CZN6NIYTmJIzOB/3dN6+PL3pfDaY/aAvRLVLHX6oqFCraO8/0VswMoypicSdQtS14qBdzCv4MfoEPcZ+WLOm8cJqsT4G7N922q6btGuN2XGhyZX04+0ieIAxX5TkCJzzpfSgBBVIS69NQwyVWWdeniZZGOEfUmvTNziNZmYyaFHE9tgX8G485r4pMUEGEr2FKxTDRdceX7mM0zU0xEkkNfi2g1ryvsvCqxBCWsrOa8iKQGhO22M56hDXQt8X7Is0YLEOqknc2hDNRONFJ9/pxjkvxu3sM1/akokScAo+CRZcq73BFtMthbM5rMNX4VbGSCB2rGoZtl1M1ovJt8ueNB3nRnScXD0aVBZHkZbcgGCvPyreJNJI5L3a+0C4bvlyUV/hL2QD/PpQK0x0r152iPt4TBTIVzl2WFLlSNq3YpBCezchN/1jep9cJyr/KkJH8dUv 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:BYAPR07MB4296; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4296; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4296; 4:n56d2/7VTF55UT7RKrxp01dydTS7Du2N1zUbPZFTaasvnIB7r4KhytnEwgwPQpgd85JzWBzUvdQ1rjidCtdOadYG8sQSTShSVKPZkwqlmZ2eNZTCHxsHgUBldiKbNHggcH/zTToi9FcE3XjLHlD+dLYdStMdFg0R9waVfNkO1+Gdwe6X64uTrtGFeiKT8zUm0mkNNAm0Nih6xMgxVgtplp+VGx31eYd0uUXbmnWFBHH4NO11fcCjiXyrbaowg5r+uD27FDFow7ptu/f5l3z7AQ== X-Forefront-PRVS: 06098A2863 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4296; 23:m7VscMEIY1gkfS44jCgepNoRYTBjcTyqYA0l6A/Hj?= =?us-ascii?Q?Wsao0w8zUHT5n8noIM2tN1ZQWBtwd9vYfTj0ay+x7zW4PkiERD6vHOfd7RFe?= =?us-ascii?Q?wEfQ5T9ifFoSJCbaxtLBvBGjvk5WKbs1jnt615lVCFAuF2lGoMuxh7PLEXAA?= =?us-ascii?Q?xEOTPx3V1bCB5lNK6shUCYn6CsEP9GDExoScM1umXlsCvsk+GF1/lvDiu8ot?= =?us-ascii?Q?2QyxwDvjb578sOSZj2LXRMjLZHPWZ6PQsfKoTH6muLei2xnMta0tQkuJARr2?= =?us-ascii?Q?7tgvBZGdLzIphT0FstCaq1PDPK0PqQR9zv5sHPyiIpUZhztwJRwJOCztBJ8u?= =?us-ascii?Q?pNwk/+pL24qbCYO34R1HFPFvwR2oqouqaA8KC7StVMnTXeOC1NglicCGJCdK?= =?us-ascii?Q?tXv5NULtOp81qRFLnBHRssh/xMB+Ef+/fbhTRXME7Tjoz7LKZBHyphRYzP2x?= =?us-ascii?Q?456oCVQ9f9bUwqy2RyDprA0pD0/bxtx6ZaMao9Sxt+SKxjIA922J4Fz+e8UY?= =?us-ascii?Q?d45j4AhM0UumKZXBcUYgapvZ1aFoCEMimHssk69ZcotqgV/qNnsCIhuzXb+c?= =?us-ascii?Q?AVY7ntFkualUbQr7U0bEM8OraKodVDZe6yDC5c8UH+eC33SpAn2PW33JD6Ug?= =?us-ascii?Q?OgQSGtRlTBvFPS+QZyTMQlTu8WdBFF8G3XuGFSoCEK43rYZ579Z/sf4bshoo?= =?us-ascii?Q?AV9eC8TxwSmRPIgC0Q6aJ3USUQvVSHtPcr+vN61pvdMZsu6FeFBrlEqH2OY/?= =?us-ascii?Q?xawuu5MlXeVSj2Vf/tvttNov+/+BsD4J0jBIxdPqhAImwLih49TWG2LcEMB9?= =?us-ascii?Q?q/kf86U8rDchbii255jnIXrf1u9Mo8mM+xv5WXWeqm/CpVWJG3noU57VAaIM?= =?us-ascii?Q?heGU9qMH34RenJQb6BoVUMvBxTSN7tUNdc6QETjQcxjvnXplc/PV3+QDUdDP?= =?us-ascii?Q?fLuaGmDmUEsZSUgnSLRpFHktit665opELGMAYR4Oqpx7GSp+q2r9M9XKWSA5?= =?us-ascii?Q?eTosvwtho6UzJHr7tbduvXweD2Ke049ArAYM9EVVuieJVvG4mfkR8jdTR8co?= =?us-ascii?Q?eaQv+ocZ1mjrKl1/z/UTNrzBExRnpiod8H7411LCAHG+iYGaoz8YGiHY7CvT?= =?us-ascii?Q?u3M3KKoIConRkhc8noPSBrtF/rJkGueOD5aQO5tgX0wIKNvhoI9AQ=3D=3D?= X-Microsoft-Antispam-Message-Info: als2GjOtZeJSDqa6z6tmP7TWcRyLbpAfz0DjLrbohmouJmR6ZjzDeZiMKs0dSRPusBCm6VlmNOSH8AMn+PLmNhd+4kCGqC3WFpbKwpaZYewdBUWZaXmUsstHFmH73eu53u5FsI0lA5Um3KUU4NAnsnKqbexdrdmx2/O+vab64YwLY9D8jTozlwdaofIDKpaK X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4296; 6:JSWSVa4PBOnzy20R336P75F+w+Pw6yvubVM3RAg3HD7nt+9Lr3z7grUDjiSQbr76/gLn75iGWxQSlp470Hxb3TiNjWmuNb4ajl/ol8hUl4nab6M9DuC5Vu+Ogb8+agf2ColEkiOF3kpcPi90y/8gmTRo8Zt+zyL84T7FL/xOHDlHpdL+f3rat2+CAS9AADoQO2Q6jtKBzUEl+JM/BsjDPXyMhcDuCxt4XdEBLqi/QKo5xO8COapFpqbbCuOHEnzAiSkgak3YudXQCIhIxfIU5Ghtv4BqbUpv0faB8FZaD03I64LU0rC/HNKZBKPUDThEqSc97D/n2XqRHErguo+xNaTDrTUFkvmhzH7i2RsyBco=; 5:/4VAMf5fXi5PfWfKtwno0KlP61GE1J890DVpFKRgWYnzi+Kvzdr4BrRQ34C/ZNrFtfZ2AjOu1t7FgR4e3pKkN+NpsaQMiNirLqsPDtEmUg/SYRVeseblJMKX0M25Uz6y907/MUKPIHbp239nNYQPguZ7QNElljwGnvYZsYEIHLA=; 24:1ng0TcZoLfha5C+heY8UKtAnpWP+59kw0FgRCb4wBIVpxtfpYmX6ZDCp93EshTwTaQaQ2MnmjxmbnLUbyHwyxo4apg2Y1ElGyYpjFDHjORs=; 7:5GV8D0t/IELYSZTW3w/V/xQ4NOXzQ5JkhCz4Pxh3XJf1amSrpFE+qe+6y72yVASuh1Dan8Y6pyYOE+5PzN59NjkXmMzdtotbf58/aCtn6BmDpedJTyybohV5R0JNQCsUrFvwYqqTuGTaw2YHF6K2KmXZMmMPGj0iNDV0XI/bKuUZ0IEPyqvcSrlLIDCnewP5c1JmzLqN2C0O0vupvrbe/fzYfT8hGh0Ufp8ALr8myAk5bkbbMEFFHCdJ+7XgR5i6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Mar 2018 18:17:04.0670 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e10d186d-4c2b-4ef1-4a60-08d588457543 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: BYAPR07MB4296 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_def.h | 2 -- drivers/scsi/qla2xxx/qla_isr.c | 3 --- drivers/scsi/qla2xxx/qla_mbx.c | 3 +++ 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 737492048d8a..745e6414b496 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -4282,8 +4282,6 @@ typedef struct scsi_qla_host { struct nvme_fc_local_port *nvme_local_port; struct completion nvme_del_done; struct list_head nvme_rport_list; - atomic_t nvme_active_aen_cnt; - uint16_t nvme_last_rptd_aen; uint16_t fcoe_vlan_id; uint16_t fcoe_fcf_idx; diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 011261a9d585..d973d0b5d8c3 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -768,7 +768,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */ ha->flags.lip_ae = 1; - ha->flags.n2n_ae = 0; ql_dbg(ql_dbg_async, vha, 0x5009, "LIP occurred (%x).\n", mb[1]); @@ -812,7 +811,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) case MBA_LOOP_DOWN: /* Loop Down Event */ SAVE_TOPO(ha); - ha->flags.n2n_ae = 0; ha->flags.lip_ae = 0; ha->current_topology = 0; @@ -886,7 +884,6 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) /* case MBA_DCBX_COMPLETE: */ case MBA_POINT_TO_POINT: /* Point-to-Point */ ha->flags.lip_ae = 0; - ha->flags.n2n_ae = 1; if (IS_QLA2100(ha)) break; diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 41b0ee47c6a1..735079ba691c 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -3747,6 +3747,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, id.b.area = rptid_entry->port_id[1]; id.b.al_pa = rptid_entry->port_id[0]; id.b.rsvd_1 = 0; + ha->flags.n2n_ae = 0; if (rptid_entry->format == 0) { /* loop */ @@ -3799,6 +3800,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, set_bit(N2N_LOGIN_NEEDED, &vha->dpc_flags); set_bit(REGISTER_FC4_NEEDED, &vha->dpc_flags); set_bit(REGISTER_FDMI_NEEDED, &vha->dpc_flags); + ha->flags.n2n_ae = 1; return; } @@ -3875,6 +3877,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, vha->d_id.b.area = rptid_entry->port_id[1]; vha->d_id.b.al_pa = rptid_entry->port_id[0]; + ha->flags.n2n_ae = 1; spin_lock_irqsave(&ha->vport_slock, flags); qlt_update_vp_map(vha, SET_AL_PA); spin_unlock_irqrestore(&ha->vport_slock, flags);