From patchwork Tue Sep 4 21:19:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10587991 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80B7B14E0 for ; Tue, 4 Sep 2018 21:19:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 71D6D2A124 for ; Tue, 4 Sep 2018 21:19:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65CE32A128; Tue, 4 Sep 2018 21:19:41 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,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 05C512A124 for ; Tue, 4 Sep 2018 21:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727449AbeIEBqd (ORCPT ); Tue, 4 Sep 2018 21:46:33 -0400 Received: from mail-eopbgr710068.outbound.protection.outlook.com ([40.107.71.68]:36408 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727361AbeIEBqd (ORCPT ); Tue, 4 Sep 2018 21:46:33 -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:X-MS-Exchange-SenderADCheck; bh=FMdUi7SSC8VTX1QODcCIPtDmmIri/Sy4UPZOEo47vBs=; b=kPWMHPD/iY5NpekinvklO+4MX7/JttiP6MVhgTMLBOumCRW/ot4SRDa0jdNv9qOTyz3sRgNkO1hE4AQAoVFPVXl7cR+MuU5S5WfHy79B4PZHUlZWOgGnpYveB/5WPUlb0PvQgCD4GI4qWXgMV7VjL5sKpX8dz5g8iTG8YKOidSY= Received: from DM5PR07CA0082.namprd07.prod.outlook.com (2603:10b6:4:ad::47) by SN6PR07MB4670.namprd07.prod.outlook.com (2603:10b6:805:3a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.16; Tue, 4 Sep 2018 21:19:36 +0000 Received: from CO1NAM05FT006.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::209) by DM5PR07CA0082.outlook.office365.com (2603:10b6:4:ad::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.16 via Frontend Transport; Tue, 4 Sep 2018 21:19:36 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 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 CO1NAM05FT006.mail.protection.outlook.com (10.152.96.111) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1143.1 via Frontend Transport; Tue, 4 Sep 2018 21:19:35 +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; Tue, 4 Sep 2018 14:19:21 -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 w84LJNc8032002; Tue, 4 Sep 2018 14:19:23 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w84LJNLG032001; Tue, 4 Sep 2018 14:19:23 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 10/13] qla2xxx: Fix Remote port registration Date: Tue, 4 Sep 2018 14:19:18 -0700 Message-ID: <20180904211921.31927-11-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180904211921.31927-1-himanshu.madhani@cavium.com> References: <20180904211921.31927-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)(136003)(346002)(396003)(376002)(2980300002)(438002)(199004)(189003)(42186006)(6666003)(110136005)(54906003)(5660300001)(16586007)(44832011)(106002)(316002)(305945005)(2616005)(336012)(446003)(106466001)(36756003)(1076002)(11346002)(486006)(476003)(356003)(26005)(126002)(14444005)(50466002)(2906002)(47776003)(478600001)(8936002)(50226002)(51416003)(69596002)(87636003)(80596001)(48376002)(4326008)(72206003)(76176011)(81156014)(86362001)(81166006)(8676002)(186003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4670;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT006;1:EE6bc5I853hIlB5lvS74q51YPbBU+A4lRaibHOSEWWSXkA3wIuQVuF8dmv3ugp50o8qapbBnbcujmqqLczF0qBJE1LbVnRdG7dW9x80lzPfrxZJ0hxyxE+ZTbGlYr1uA X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f2b15b4-91ff-40d2-6acc-08d612ac1da4 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:SN6PR07MB4670; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4670;3:N9v5JjhTcZtdhzlMNpUkRHpW0Ft5zHms5D5bg/Pbd+V7NoPYzhoalZWbbYl5B/DLznWfMIARadL5Vth2R6ivbdSu61TxbD+8J+GI4HamLSr/AXqmm/pY8McvRpsfF5CQSn5QvoV7h4Ttil2YMK97yK4haxATjkkS6mIMlcL1k0JisJK1Tu8D0mWvnUxzM44c8G/UIbgJ7OEdxhF9C6ZCrBpVYe3aXqZ/z9Biv9sPNaXb4A0SPq8MIto464dokV8B8EiBe1Iy8Ns/xT3ok2z7HQoTmrfDWDEsIEqokKWSP5yL365Spr7q0ighg0Vl4qWoq2vnJZ0Khs4mYvjkWLctkSQAqbzm+CeJO10Zcsj3FTs=;25:HblVR5wrKNFHy15LLdTPW4/Qw6eYzh6rfP7ZXxpUBR53ZcXi/FGFFvuY7Gn6HriLVis3qmVsPCvooCxHJedHNMJgdxZjrVzF6guoPiMLH8YvaRFDultReNgVbosdNAQdZTEVjzwNZhojtuLB2Z1DjZEUuDRDb4OhKeUy70fQ8hzK8n1mmMiMWNytOP+ejmkn+lyRBFiqSx1EkwRf3e+LoIpjmAM6i9htp2GglPIxdpEoGQ37TnZJi/rk1WUhPOdp8J3CuYDixlsE3XUsQdtDEqPVjL66mVSU4Or0t12armVwPoqwKA2Wl/+cSkpjXnphXgSYZA8CRwvMbmmoAsXRKg== X-MS-TrafficTypeDiagnostic: SN6PR07MB4670: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4670;31:K2MAzv3c7i+qHM7BDmgp8erDQioznTe6uFPgpNG+61Ho3zx965MFio5MsJtnI+hVWkB0fvNgTInDyj6GRRUzzyHWcldpNynRuXjfnfSegI+/JLh6SZfm68Pbemt+tlJyx8jhx/x4z3CWGMyv3PeJ0HgUaJqV81OCQHDyg8PO3VF41pODB7JxjkTEJY8yoqK6GQ6qVaV3Ni+gPv+YYwCMv/TNTOYiLT0Ft4NL1x4ORYk=;20:SB6csSzKCIl0lnFigvEXilAwNL7J6AQsBwpu8LYojkC34+i4+GsrU7MGaB67xci8kgerKnpM1mNDmd7RNk24eVDxVnixpSfYmSz2f5TF9qftxagzuuqKIeoPCBiC9hhWnT1pDQIrUS1YPJhjQ9uiGOUmxE+w2XUs7K8eYOzXfag3xfaH7rzEnAPa8+w2JP13j2Fo5x5MjmD95Ah8Ea3DuLwn8PKGkvoil+LdEmvVZKQXTc4stCzKFq1+qQ0EVulpYLpukCmssWpI15dJkdsqRV4OrZc3/ZgKvASMPjWCub9PL7YzNeOhpfZ8K2mUwOddzPjW8b9rFhCJuC2COVD9SNIi48obJWSgKHg3GH1YmtQwnqCb1qW8Lr7d2syBp6JnZRtTwOyFWc3Yte8G9cJWJEV3Rq3LjPjYCyYgMS6m0cZPbvUQ8RruGRfV1/V1lO8tSylENjiO123+IENBHPKUGaOv6ZO4XlsmRyYrnH/m4liXlObGVHoV74vi4K2bhfm4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(10201501046)(93006095)(93004095)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016);SRVR:SN6PR07MB4670;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4670; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4670;4:QFoBcxSz1F9Pg1IYBHOy1fG0KpvW3cNzV+lVz2ZV+zvS8hjkui760Xb9GXJeD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r0DPVJnvvXCXQiSlaZSUOTrYXtAvVzyuBLtAjdZvKx9lB94KSS7nK7Df3/3n66CbewLSG8t5fcyXsBCT798qzw8kxxZ/c85ikQkUa1ngaUBBQGx8JPOEVXdNMnzLLuEjQzIOeCuzAd/A4wuIGJ04r6naeC+HZMNXdgTg==;5:8KCB7pDBOwHZ1fcLA82iQj4xUDGmlQzK/SWwZe/radgYEARbTpzP2VBWhvuZaYoM1cTqIChSqcosCXZ9Zn1MdxI4Pmu3XVKif6PKJPW1KzoxtS58kFGeXp0nCGlcF9FrNx2oNrF3DkBFkce27RabpR82NRUo7VAkpkSHNW+S5PQ=;7:gkDoat5svJsjTsWymqtTee4wq5VLkSIxMDfPdMOQQVAxoe/hO/Ylb35ypoU8REW6k41vfjk/b5fcu1PwiblZFLLt5wNco9R11piy9nsavX0zXT+u8NCEf7LBk1rzH11FL+/L6vyLzWYnAIBK7/FsHrWo9tsDGnFckCrk15wg2EhTlop2NkJMcflGmUT1wY+enSe+RigNa2LZtEbbrqOjGaaaOEFkWvlKlx8WcYxKBxf+Fs4ymyn+gVWi4256mv9Q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2018 21:19:35.7993 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f2b15b4-91ff-40d2-6acc-08d612ac1da4 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: SN6PR07MB4670 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: Quinn Tran Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 3fdd4336017c..e7de6f149e34 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -5291,8 +5291,6 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) fcport->login_retry = vha->hw->login_retry_count; fcport->n2n_chip_reset = fcport->n2n_link_reset_cnt = 0; - qla2x00_iidma_fcport(vha, fcport); - switch (vha->hw->current_topology) { case ISP_CFG_N: case ISP_CFG_NL: @@ -5302,6 +5300,8 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) break; } + qla2x00_iidma_fcport(vha, fcport); + if (fcport->fc4f_nvme) { qla_nvme_register_remote(vha, fcport); fcport->disc_state = DSC_LOGIN_COMPLETE; @@ -5330,6 +5330,8 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) break; } + qla2x00_set_fcport_state(fcport, FCS_ONLINE); + if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) { if (fcport->id_changed) { fcport->id_changed = 0; @@ -5346,7 +5348,6 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) qla24xx_post_gpsc_work(vha, fcport); } } - qla2x00_set_fcport_state(fcport, FCS_ONLINE); fcport->disc_state = DSC_LOGIN_COMPLETE; }