From patchwork Thu Jun 7 05:19:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10451143 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 D400D60375 for ; Thu, 7 Jun 2018 05:19:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3AA129653 for ; Thu, 7 Jun 2018 05:19:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B842F2973D; Thu, 7 Jun 2018 05:19:44 +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 5885329653 for ; Thu, 7 Jun 2018 05:19:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528AbeFGFTm (ORCPT ); Thu, 7 Jun 2018 01:19:42 -0400 Received: from mail-by2nam01on0082.outbound.protection.outlook.com ([104.47.34.82]:24267 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751658AbeFGFTi (ORCPT ); Thu, 7 Jun 2018 01:19:38 -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=Osp555LwqBJfCsfYDzXBR2uVrgktSdjX5MUOKWWZ2es=; b=CG4NJGMhILgr6UnNNZO5OHojvMi1bS2RQenI2UyKE5uoXpEvt/UDvOj3/2DzzJeKM9p6+a5ZsxbKRU3/rjvnDj1rJz+HQnzPOopZh4UsP8vni7t+f1GBzPWqLEX5cWvyMerB0WijSPY5kuqC5/bNUMHSSHXZJkeR7X1an4QGqzw= Received: from DM5PR07CA0105.namprd07.prod.outlook.com (2603:10b6:4:ae::34) by MWHPR07MB3181.namprd07.prod.outlook.com (2603:10b6:300:e1::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.820.13; Thu, 7 Jun 2018 05:19:36 +0000 Received: from CO1NAM05FT060.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::202) by DM5PR07CA0105.outlook.office365.com (2603:10b6:4:ae::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.841.15 via Frontend Transport; Thu, 7 Jun 2018 05: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 CO1NAM05FT060.mail.protection.outlook.com (10.152.96.178) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.841.6 via Frontend Transport; Thu, 7 Jun 2018 05:19:36 +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, 6 Jun 2018 22:19:28 -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 w575JR3k027999; Wed, 6 Jun 2018 22:19:27 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w575JRu2027998; Wed, 6 Jun 2018 22:19:27 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 06/12] qla2xxx: Fix redundant fc_rport registration Date: Wed, 6 Jun 2018 22:19:20 -0700 Message-ID: <20180607051926.27940-7-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180607051926.27940-1-himanshu.madhani@cavium.com> References: <20180607051926.27940-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)(396003)(39860400002)(39380400002)(346002)(376002)(2980300002)(438002)(199004)(189003)(110136005)(87636003)(478600001)(1076002)(80596001)(36756003)(81156014)(69596002)(48376002)(81166006)(8676002)(72206003)(305945005)(47776003)(50226002)(8936002)(6666003)(5660300001)(106466001)(336012)(50466002)(356003)(2906002)(486006)(476003)(4326008)(2616005)(186003)(59450400001)(86362001)(51416003)(316002)(11346002)(42186006)(76176011)(106002)(54906003)(16586007)(126002)(446003)(44832011)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3181; 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; CO1NAM05FT060; 1:tJCriiQN2Ufk8uHKbDWUI191beoSRe33UnJh9Dlr1V3f8h9HA/mzyWUfTGTudvesKOGEFjZxGjZWQyF+1vB4nkNQoBeEB74x+b/vUsr6DROwB/h+OG2zjTni/3LqI0x7 X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060); SRVR:MWHPR07MB3181; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3181; 3:w5/DGlJTpC3niq6YMilIlPd/IhFKNf+zRMyku2HB9AoIaYWgAnOIHZDzxzjwCDy/QV9EdkCKDGSfKCsjU7Tl9Us8YHKPfUFzTqph/rI8W4sCSdOPrK5vE1cpnG6DU26jEC4vgwa41lOt8PPhqDbMD13IRHeQzfMuSPFC9JjXMwHdy6JMQpW/Vb07XxxjbY+TLs8ymmfjVRJVlscbxKA3hapqJro1ZA+f6FolLgB3hYx64qnFRVKLqMjkYGFOfh5MvTxL4IhLcEt4pYxgRIp2c6fVsQwcPCy9uDwGj4zyDrcoXMrb8rdlHEREucm/AT7Hxm6Pvp7okWMH2wbsVAPM9BGWTrxxPgpRqwv/VzJZQ4M=; 25:OUjSqVbSEY4U1DRlHRUyHJsmyk2NGwGG5SKnIEbkYu2Bio7xqesp5qI+zK0Z5vdPzymH2YwMGR2VhIIUUBnzxBQkGXon9gV2blfxKSDPj7MLHd0UI/te4kz0GqrsXCHOYjRDeYzZMQtMmkUuCdnQ1ULyrJTPrbB8vx29eqIbLY//FEf7lOnTbG4I59SHLg1E5WHGg0SVZpZ3dMwPkx4lTaYC3rDatUXmX9KMvTVYx0AxJBgnYpnhdHoqV03wEYZHb11iRPJ7HMIpBw0J7xwaSTU/9fOCX2sIiMUwXkIkkDMdgS8UvMj8SVeswee9B8OnO2wbqXGhgH9LnnuHqYOpSQ== X-MS-TrafficTypeDiagnostic: MWHPR07MB3181: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3181; 31:8fFMrgscFlJbyTExEYWVrkTuCyNctXiy3j4bevV/T2vtFBFtTrWflR3lKYWPDDr+SvuQj3O23JqJPN3jCquxpGkWiBQaPXo37tinrprOo9vvWS9lPgxkZ308tYyBHxZdLkUy3sR6LEPpBVaha+z1ttzNqOX728n/qdGOAgXsQMq9SWMqoUWABfp4LHUiqi7+7AufDll3652XTvTe6Ozgc4ItykZhi+HR+RseGImqHCA=; 20:bX2Cj2s0tF3LDwmLFs9H/7hTtMLQCQ0aKTa05JPw0XIF95tfCrNUZz3LXR7Gr6jXGWZJ/dO4O8myg/HQix7ic6Clu1nNvKSLw9P6rgLHJvZnoEeKa2ufp/MCAQ867YR/zt7FzmVkbieu+fotmhtJPQlBeQ9K11VD/3oT394Nug946PJwhsqNiifJ93bD4En0na/w5zVPMTZK1MZhlvfwyRYlsPuVHJ5Uws+wv/J/aix28obye4aY54K9A8yuXqMvfI7lN4HCZtlkQnyk2yIdxMdHEi6c3RKbnSREeYuaQYYYSrirNIzJDngAfeS6aKocBDfsXrIyxl+QAgHwtJexf2yZipRZrLxKuldYhQ2tQSREWZDyBuKNMzh4S183pg5pk9IfZo6OVS6MaUkWJS9Coby/xl7lUkMpLXrolvB3nHG66k/eE1eAmIRyicz9qU7u22ozuD2+k/gcA5Raz2E5BhZzbMONfkSDkuX+/T/CBxu93OMzLyONmTt38aJxUchJ 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)(10201501046)(93006095)(93004095)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(6072148)(201708071742011)(7699016); SRVR:MWHPR07MB3181; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3181; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3181; 4:yZyVn2qk8WXtZeSniLwWuOk1zM5eBZq195dAgWhb7VeV1ZrOTRAfpACktkWWN+c07vhGDpFpTDTXDEMdM5RT1Z4M5zvV3rNrXFk4hd7+52axDcGKOFQNfJ+eDT9B6mVX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tr6r+Aac/FOW+8CPaSKu/wT9reLDkQ51+07v5Rqxv2KjglGdutPNXmRFPfTucgPwbiOFny8yVjovDr1J8Fx7zL44U+6P3tNYNIWeAZZrlOltOfsZG5dgvGAhcnEWmg9F80HaudpFaEF2j+tFzMIs/y3QxoqrtiDHKDo4wAKFDoLQ1mEs5RhGBtK01nxHeLvXXd+1pNnoU1YPDzTpvhNxg4YA==; 5:tSZ3kkfdxWre6DDGoVQwlCE2+m5rhpQ4kh6NOaoVQCpVzeZZ/gNzBf7834ClRNptddjr192qz3qEOsyUrY7ZBSOLEEiVm3RUkR/Qf2Vv10tfE5FNbik3sV+k88IntE+P6iQhpVtsfzRpOQWk/rRfi7fxNk5v4x2F5ryqFoW0Rfo=; 24:reIDXmDPS2OhAR9+I2eBfpfruuf3u9vKCg3ldEXnCUsZoOS2vqGJmQmgORjuN/vAAfPIoSpmlAnCJzT3vPEGoa3Ped3ZD0NMAUOS3P8GAaA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3181; 7:RaGZdapOXxM/KyCQ4koNWjNaTKkTi2bVPOhx9BYfrdHTBPPR1b3/nsjuzTdexLhddHLI34T0m1pDtWRqSf+q5i5gEMvuHhMIVHNqrbJxt4R4GQSl3iE72+MEy9o2KHcKv4JePDX913s/JLhH4JYP/Lwik2J46qrXNoJ9PZARtLGPWZWTlIjPjk7kBdMHtP21winB5fO9yjeFTtviwKpn6kAkW8uXzse0YIFtASyzviJjC3+IEFh8Tv4FRajL1Mjg X-MS-Office365-Filtering-Correlation-Id: 5fe077d8-4bce-4a7c-4d63-08d5cc3642cb X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2018 05:19:36.1213 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5fe077d8-4bce-4a7c-4d63-08d5cc3642cb 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: MWHPR07MB3181 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 Prevent multiple registration with transport layer for the same remote port. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 0fae17d1aaea..530d6e72d974 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -5169,19 +5169,11 @@ qla2x00_update_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) if (IS_SW_RESV_ADDR(fcport->d_id)) return; - ql_dbg(ql_dbg_disc, vha, 0x20ef, "%s %8phC\n", - __func__, fcport->port_name); - - if (IS_QLAFX00(vha->hw)) { - qla2x00_set_fcport_state(fcport, FCS_ONLINE); - } else { - fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); - fcport->disc_state = DSC_LOGIN_COMPLETE; - fcport->deleted = 0; - fcport->logout_on_delete = 1; - fcport->login_retry = vha->hw->login_retry_count; - qla2x00_set_fcport_state(fcport, FCS_ONLINE); - } + fcport->flags &= ~(FCF_LOGIN_NEEDED | FCF_ASYNC_SENT); + fcport->disc_state = DSC_LOGIN_COMPLETE; + fcport->deleted = 0; + fcport->logout_on_delete = 1; + fcport->login_retry = vha->hw->login_retry_count; qla2x00_set_fcport_state(fcport, FCS_ONLINE); qla2x00_iidma_fcport(vha, fcport);