From patchwork Tue Mar 20 05:58:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10296433 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 B6DB260386 for ; Tue, 20 Mar 2018 05:59:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A70D428AA5 for ; Tue, 20 Mar 2018 05:59:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B7572951B; Tue, 20 Mar 2018 05:59:05 +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 25C3C28AA5 for ; Tue, 20 Mar 2018 05:59:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751729AbeCTF7D (ORCPT ); Tue, 20 Mar 2018 01:59:03 -0400 Received: from mail-sn1nam01on0069.outbound.protection.outlook.com ([104.47.32.69]:42548 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751677AbeCTF6w (ORCPT ); Tue, 20 Mar 2018 01:58:52 -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=4zNEVWLvQIzcoWXCHYGvEMvH4tFKHXiq5In6rE6RdKw=; b=SO+eTGcLiFmF237ct+8ypH09BH1AcpZp8pcK8m8NBDFrQRBxHULTAsC2CzC3JcyeBzJO4KEia1rrkary5AvdnvQBrcwu2SKwB8KMYLILDWk+GNcls2jtTn5sVU6QQdNQYBkZ2uLQSGEMT2s1lsfArSpyfG5nChV4/DOZO3808EY= Received: from SN1PR0701CA0032.namprd07.prod.outlook.com (2a01:111:e400:5173::42) by SN1PR0701MB2094.namprd07.prod.outlook.com (2a01:111:e400:5309::29) 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:58:50 +0000 Received: from BL2FFO11FD025.protection.gbl (2a01:111:f400:7c09::114) by SN1PR0701CA0032.outlook.office365.com (2a01:111:e400:5173::42) 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:58:50 +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 BL2FFO11FD025.mail.protection.outlook.com (10.173.161.104) 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:58:50 +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:39 -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 w2K5wdRZ005305; 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 w2K5wdWc005304; Mon, 19 Mar 2018 22:58:39 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v3 06/13] qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change Date: Mon, 19 Mar 2018 22:58:30 -0700 Message-ID: <20180320055837.5246-7-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)(39380400002)(396003)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(478600001)(356003)(72206003)(47776003)(36756003)(106466001)(42186006)(8936002)(2906002)(50226002)(80596001)(105606002)(1076002)(5660300001)(4326008)(76176011)(51416003)(59450400001)(85426001)(305945005)(86362001)(575784001)(316002)(16586007)(50466002)(69596002)(48376002)(186003)(6666003)(87636003)(336012)(2950100002)(81156014)(81166006)(26005)(110136005)(8676002)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0701MB2094; 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; BL2FFO11FD025; 1:nppwbIb2BdSKkG6OXusBu/yO3k8YRLY36mTPxItpYILfWJRAo6X9/9KiklVjcZYBcnzCBbumxI81cDAaZ7iCZL2YIIJzhOEIBQfTUJzAAZziw1YylXKTMFXPuwht7VNk X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a0c9fdcd-ae21-4dd9-e20c-08d58e27a75f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:SN1PR0701MB2094; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB2094; 3:YUIBLQrLrUSPbpGmbLNo1neGJ39sH5BSdBjpwgyR5B7nT/bq5v7zw9v0Cy5ytN+5nie4UAvs2Ua5HhZng4CZxnWmC1BPeY1jbHp9H7dX5okO83tvRSRGKN+oFKK5JvEMZANNE1d8ukbqP+NIWJCLc44Fl+7KKI6DBkS2pOJYBvHUpcux3lkXubIeYn/McIdDvLl9GCOltfFv+4DMgE3Wf7TMRkfFZThe1G9NClG4LfswRDGu9hVdu2XFOUlFEElltTtvysXqdU2KXiS8dEXPusOav4l5qyohtqxKfWNUBkQQbrjzcLtYYuXI8mgCROFNKrolnaTOsR7PvKjabVOjA2IDKZ0fWzOndVEsoqtCWEU=; 25:CreqkJn8X200zYw7QKykRooAelZAuOfGL9hfqoaIUrFAnPGKJxX5GoQNLgXEUlD6GAHHtXaUmXJivzypwBWONdOFUHHptv+ibtuu3Fgwz7Vw4bPwnL8Xujf+8aqNJPuntRQCiVUf1JFn5C6DodlXcTG1Det4lc6eOENufM7lCFuZTs+GoVM3G3KRXWTyh6qtBRw9Vj+EIRIIpLyn9KzpfycJEdVGfghrJOGhInzdZKqrZorJEA4HeO9v8AFdKwIzeXi/2gVIPmuaFop7c9igsEemKvgLvFZMEASasYaG4Mus4rR7/21KIeGxUD5T4Hp75L3rA/6Pucb7qirK2FPzmg== X-MS-TrafficTypeDiagnostic: SN1PR0701MB2094: X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB2094; 31:/r7BZEFFLCfFjzRvh5i6i/9hBL5+zH/grTxFxcsdSWMWSp2yx4jpn4vlJR4/gThWHPJ7tQBSPrC9OtsuwGlWooqh4aUXd+o+EYBx/4qUbWLBjoLZ0TmlPiFnUUK0I9BvqOcSGkzpsHxP/AMfqIc+tXph5XIZ1KIWPJ9GFb3k6Pj9O3X3LqtcJLukA7jFKTbgnKvH2xPepgZBVFbEBkH9saN2eIe16qrsFxG6TymeD+4=; 20:yVq5ug95yWGtBWy7d0PooapioahJFtEpAuBcWLgzE9HES0VioEhA7tvwWFhMQrhkgU0q2KUIn1ICmSkQbgxCeFD6tk+a/BAbDnYdB1tzC1o3iUfl1hmoPFSg1VFEAPIFrZ04RfBJVVzWXa2bVV4uWoOgVEuR3fUtFAQpNxdfNt6+5tqr0KF4HbjsIGQ2fL7n5XuM4XOKDzoAzV/1KN7MMcWWa8yDEOueKD4W1WPvo0GQqCkZqv9fwUhxMOLpVqzj2LR0qZnGB89vynTokov0dhBLvrsPLkTrJtjfI+12ZLmvYq6PlrlYGNjMCP7EC4o5ofXX5YFNzF1WHQ30dPTYhYs/TAlJe4erzbZwtzJ5+AAVgbjfcsOEOn1idpKDkR/udnKx3eVCSJ5+qlIn8AyS0a8g/+HMvfXme08Vo2AbRrHN3aKp0IGyhTgQhltRWWRVOP8P+nnOj4xOS0R11O7aZICnCccXEqZ6ScP3QYBDneA0a+W24iw/SlJJPJOHvMsF X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(6041310)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(6072148)(201708071742011); SRVR:SN1PR0701MB2094; BCL:0; PCL:0; RULEID:; SRVR:SN1PR0701MB2094; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0701MB2094; 4:NWPI6U6bg5PVpoDzg6Sq8Wcuc078ttyL0vTX8DRbSuYCU4mtn7Ayu6AzcAI3NqQD/1ja3p+UgI73fG3jswwQnXhAJaouyee9+T6Rx8teU89Vkr6Zy5YaUlPlc7dV21OhJR7xrRqf51uqyOc/puXmhWJ13jXx/6GMqArr6xdA12LRx+Uh1LuA4ZJa26iSGZM/kfITfmpx5H5ivYkLAFe3jWbuGjyHKkD2S1P0zNjen6b1xEd4uQl08+E60GS7Aa+I2aBewX1cfw4QP7WWIIFx7A== X-Forefront-PRVS: 061725F016 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0701MB2094; 23:yBIMezAFDWaIW7M6QohFphglhJqG8/kpeFzkn3o?= =?us-ascii?Q?Hq+dK9mn4elyurDWFokqPi9ScE6aVjYYcMhcVZdjUKNDB5Cfw4saW5XuggX1?= =?us-ascii?Q?DFuCwMI9x3WktV4XNRsfDCKsb3ZzT5hjxehZ2PTB6C0KA2+xlgzLH6DQqOCZ?= =?us-ascii?Q?7HdaNMtXcPw4mIQOmprTi4B04kRBiglF5D1UzhymY9AdQAR9UOna/wSirFmf?= =?us-ascii?Q?8Eoz9XJ6YeHcylrFv76tQCFp3R6Q/2MREoEzrESQ1UHnklomIZZHnpiwXcLf?= =?us-ascii?Q?0BJcMdSWxs2OQI7roCpB7wQz6QHXjgBRNt+T8FMMIY3WJcuLR98xVgjK1Gvj?= =?us-ascii?Q?PxghOTGb2MI/b2uy+XWzrVetNa2amSUNfPe9FS3M+NfRcXqc1+Fl8xoW7SNL?= =?us-ascii?Q?UokwDjGWojgUN85ASZHW4/X9OqwSuH4u/WFa8oNiPKmPJeM02NBYoSinCPJG?= =?us-ascii?Q?7Pgu2X3A1yskYIQ6u5aLL0eUTEQOiwM6ZI7zDWheyLg69K3KK5/nAR9AHCYy?= =?us-ascii?Q?/iGUnlmZsR1Eil8zXN9gNPEVfD6v04ij5hxJiBOLiyCmaNQ9mbvBjhwFclNJ?= =?us-ascii?Q?fd7hgIbFTR036CBomc4IIe2Rbl05XgCyoq1UWL9nhUsMg6idqhX5kTsMWBP+?= =?us-ascii?Q?zjKohpoyncTx+DEeinottQ2OZ1YYATcRh2ufeGkVcBGI2PdVdN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eum82JDtKOkPxuXNRiLN8aKauKFKQHYn4LwDBS1cf0dIp6Dlmne5WA71kJICTdqRnjFEsOGJoMuOtUdWRRw3AEiUq+Q5V1Uik0fafRGVOOZLzn0O2k5IBeM=; 5:eaTp7kbUFW5zfAkxFRfEd+pWNL+axxUhnrtZ8MOpD6hWA0X5ThOStbo67qzj/qlnYNMbmadieESwWGNEiB8EiFXAwL0/PutVlemaT7sZ7ycFiuh4izHwB0clABcNUupg2NlDCQhwYWLToQNMZ8+o71CZ+u/2Dui73pcpke0pCu0=; 24:K3s9sUXRvCAtnFegMSQOUQVkkYAGknnoHWIQVIzsz1JsArA8Bahjcqhq3BAZnnrGJ84zwzudaByjqgqBQgeFx3srhkIL9Y1F9mqLk48KhuY=; 7:C/QnXEIOQBKKfexiDcbSvIn9TAlfnLFfnAe8i3w2PxJyX/ITUNgGQjwJanZ8g1igTrlT1B88ZJfIhfshcQ8CjFUtKwFssH1p+tGAdrumh0zX70Po3r54WBaKxhlJt7i3+rHwtSqqNdI7tswFpbFh9mhpn7frYv/j3p2l4RCo6LXoJLC06QYqvc0jBDorHjYV/+tXMuQ2QCXNWrtlvQO7GD9A4cD4nyoUCwBu71eLmTPnbIjdjjxInbZJ87hVckdE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Mar 2018 05:58:50.2152 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a0c9fdcd-ae21-4dd9-e20c-08d58e27a75f 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: SN1PR0701MB2094 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 On a port db changes, this patch will set n2n_ae flag for N2N connection when requesting for Report ID Acquition MBX, instead of Loop Initialization or point to point asynchronous events. Signed-off-by: Darren Trapp Signed-off-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn --- 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 56f78dce4d3c..cba749d27154 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -4281,8 +4281,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 93f2f1df7168..913cd6cf5907 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -767,7 +767,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]); @@ -811,7 +810,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; @@ -885,7 +883,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);