From patchwork Wed Jul 18 21:26:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10533325 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 9875E600F4 for ; Wed, 18 Jul 2018 21:31:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8875D29A0F for ; Wed, 18 Jul 2018 21:31:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7CA8129BA1; Wed, 18 Jul 2018 21:31:00 +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 1771E29A0F for ; Wed, 18 Jul 2018 21:31:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729296AbeGRWKq (ORCPT ); Wed, 18 Jul 2018 18:10:46 -0400 Received: from mail-eopbgr700069.outbound.protection.outlook.com ([40.107.70.69]:10688 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729142AbeGRWKq (ORCPT ); Wed, 18 Jul 2018 18:10:46 -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=LRf11Uf2CYxvrZ8JOqn7WNLFx3yB9gfY9Z4vxb6ZKmyjXLGkdmj3kTElF3OZks12PDjjzbtuA89J67Hiy18gH/f66BOnXLT6g4jeRKVETSLmmNYtLk19H6gdSeUds5ysSWiPCRMBxeFHmAQBfe6BoOuUn9xZqYgrfaR9AKh4yYw= Received: from DM6PR07CA0014.namprd07.prod.outlook.com (2603:10b6:5:94::27) by SN1PR07MB1469.namprd07.prod.outlook.com (2a01:111:e400:5838::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Wed, 18 Jul 2018 21:27:05 +0000 Received: from DM3NAM05FT028.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::201) by DM6PR07CA0014.outlook.office365.com (2603:10b6:5:94::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.973.16 via Frontend Transport; Wed, 18 Jul 2018 21:27:04 +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 DM3NAM05FT028.mail.protection.outlook.com (10.152.98.139) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.995.0 via Frontend Transport; Wed, 18 Jul 2018 21:27:03 +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, 18 Jul 2018 14:26:56 -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 w6ILQtaK013384; Wed, 18 Jul 2018 14:26:55 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w6ILQtCh013383; Wed, 18 Jul 2018 14:26:55 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 06/12] qla2xxx: Fix redundant fc_rport registration Date: Wed, 18 Jul 2018 14:26:48 -0700 Message-ID: <20180718212654.13325-7-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180718212654.13325-1-himanshu.madhani@cavium.com> References: <20180718212654.13325-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)(136003)(39860400002)(376002)(396003)(346002)(2980300002)(438002)(189003)(199004)(478600001)(87636003)(4326008)(72206003)(47776003)(106466001)(186003)(26005)(110136005)(54906003)(76176011)(51416003)(106002)(16586007)(14444005)(81166006)(81156014)(50466002)(48376002)(8676002)(86362001)(36756003)(476003)(336012)(2616005)(486006)(446003)(44832011)(11346002)(316002)(8936002)(126002)(50226002)(356003)(5660300001)(305945005)(69596002)(80596001)(2906002)(1076002)(6666003)(42186006); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR07MB1469; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Pass; LANG:en; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM05FT028; 1:Dz5qHFsPWJvw1e5Gn9fivC/qBjvY2r1DsjBxCUX10rHk2wS7Wlxu5BmBBpeoionJjyUPN98LXQ5fpO4xFU3UUyFEZXZFTi/wvpam6gb92UIZUvRtAJ8JUpR5hQkREQRQ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95a90f54-5d4c-49e8-e6f7-08d5ecf534e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4608076)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060); SRVR:SN1PR07MB1469; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1469; 3:WSyKr9f1+2KYGFRqJXW5TU4XJG6yrxUYyKVNKeK0gUyPMFLKVWpyjyef9UBfPJ7cPFr0V0kl7VV5sOKqaH2sfmd2NJMzWnezR89MEu8qAod1X6RnIpJnLfi+Ui0O6c9iCorh6lnpk7ESeKrl9irc14jBjZPy7GSKIX/vAZhO+K9l+xeWItSJYHxfH0m8TIv5dQ/HiFuqc7LkmqZ7oP0NLuDizQvLURkFBG0HKUERZqRvlMr+RIbwHcKgPy/niN4+Acxo9XHqSajUzy24v6h0QMvHxIWoXjDWXIgJKx0kk34xzU66qM6LNDc8binCeh0pmnZTgq3+bFDw5z3lkV37XMeL1Agn3dOwwbdJpbLUgKY=; 25:nokBnuYAzKbCxxcWt0tx616SpdpPPqegF0UllbSc26VyXXemBV20oc03rRciknD58mvepb8OWO6XTfAeMcGLAEyf1wdkohcmoF6ngX6A5xHxnyNvu8vq0I/F9PsF2CyXR+wa/7SzQZ1+jBznUgyLwtqrbr0NUYv52Z0KTQMOEaRKyuU4rJp0JoJYOT9ubxuUofjjQ7w3sgg2VNV3iQgGnWLOmlWBoz0wXKt8ID0QYJx8wQI+V/oeILmJVony00wurla2vKxRDy5e0rq74J6C3d9s0w8NFu5QGQC0w6JaiWkXIsHxXHa82DQlfToWy8vO+k85GjSYfYy63HFi67XfOA== X-MS-TrafficTypeDiagnostic: SN1PR07MB1469: X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1469; 31:3FkUEQvF94uqSxJTrBOAhMvGlKC//oo1fueuTgD0ms8erfXWhWkbz5LmrjfaCKr/HpmxsmDZX4BvCmBt4DUUhFtYvRQ2dSCo0EzWGnshmMAb0qJbGroA2hBVNObC/lvKF/44Ws4Sf74/LsrJ4OtBlmpAiwOGXfYcQx9HOO1AfE9NTS0dNsaucRRhh6a/Hpz8C2z1wqh/IEc6rZVjn9tFALruxj/gxMiEcWSWLoISLgc=; 20:/5TPOnmJ+4GPdS2HRoP4Jo6F/97GKhxWKlOEE8jQNRMOLL5nhC5dzzHm7F+KfZqGW0saVoR9+hT38gGmHqf7qcjUyGu9glimcrOXDuFY9aumq+s4qOpZ3jD34FvbI4IbNh9AZsNBSunaxvPPvYK1q8OjYezYkyf0J+fjzFctD+tsuSvFRI+xjJPXtyupaOxO7gCu6opWffR8HaJLKTh2y1uETHb4bsh1hlCQU1VkLIeU99bnrSc3QWLNbQQUf7mhFqDl0kijLJbTg2fcUPWVJNvYEwW4GKn4/5e3XSck7towrDqMsUhFU9JzR0TwXv1wcuwkrfnugbNEvhbAcbJJRdZUgZAKyJKmCAHdOOuJZDvYbCBuCa8TagZZExsww4ztJu1s6WoQEpOpADY7YSBWj7lzovGJT5sO3xBObzeU7yvP+LQ5abpjnO5dwwGs+cdpyrY/UfAT5ALgFeEsoEG3MYjp7PctV3xzB9PTWCdID51J1ibjpea2oykYOuVajSCa 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)(5005006)(8121501046)(10201501046)(93006095)(93004095)(3231311)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:SN1PR07MB1469; BCL:0; PCL:0; RULEID:; SRVR:SN1PR07MB1469; X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1469; 4:b6PdkGLQczW4OpUe44eu17rMpmdi/0s68bepUzRy2k2h6b5lX5DpkoGgDL6LEZXdegAcES2HVQPnMctRWWvcpe1akx4FXWXicY43sCOhU3GEuTvNMFyR3iI1/wXbJ+OYDfen2JPkdCYBe712ryU92EgpRwGYGx1vhZi5hmgI08DBbuwtbE/fTDCMo6KFGHh5Ecmd9bGkHV77IFMW2q09JQN5qD9HbUC2+vrwdg9tuts8P2y7fCqHOUzfvkgDOG2Ch7D6yuHq//MJ7wgKXO/Irw== X-Forefront-PRVS: 0737B96801 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR07MB1469; 23:IqSpFbtYLU2yoKk1GY3a0FMiJFGNn2gErKn4T3xaE?= =?us-ascii?Q?BJBiLIsJ4f7fazP0T+u5WOGlqlHqcRDhhfSIxxEqTkb75qPwN08iK7etpIpL?= =?us-ascii?Q?didjBqTZynKb8uYaQGe2P0MKDRt1eJmCHC7xmk04q/mXPIhl3yELWMRBPiOe?= =?us-ascii?Q?M7k9E1P1n+xLpXMywvi9faqdfAqrBmwQXVOWQHelUmCb+r1jznqD/ANnw0Pd?= =?us-ascii?Q?Iwk9mryy7xQm56PU4FrBTEUpkrQ1eAlyM8C8j1EylPPasTp+5Xsd5G4MSIqa?= =?us-ascii?Q?2HbjawFHeW4FBLQv8KeixIJyY1BY1SCAjb200C5zj5wblLcr5TwDsCE5KLAU?= =?us-ascii?Q?t5nqYoYZX5SKGSTguuHjJaYm374UZ9wfK35de7w9IqtFDyTuI+dMiwQeY4Zv?= =?us-ascii?Q?+QVwVTerAJUHTGX+R+rzHqRCUGInqV0dlqoXYbIKqHAv4dD+1oJa3xNLiQpr?= =?us-ascii?Q?VVufI30vERJLHTTyDAdsbpkiRRBl31zsk0eceA06Z6cQX7aUxce+XtTm7CLX?= =?us-ascii?Q?4gv3fHTwxj6C7PqWda0fk+CsqrPpuhqGa4j2Qt50GwkSfL0EQQBdk67I9Pfz?= =?us-ascii?Q?oDHQnzIwNHdXqwXsee7pkYNM0/lsjDFpC5B17mNh5Vv4+sidjx9RmAA+oSzA?= =?us-ascii?Q?dR2uMcfb1bezOTSf6IRSmcVi/ITFyYdAW8WFQTV+9YCRoIwEpvdzxE51h1QF?= =?us-ascii?Q?IQdCTRmLuSd6OKSp3+VylEnFSnnhnllp1I5csh8/Dpta3/+wl6gJ2jHa5zwK?= =?us-ascii?Q?oYBHLpfA11yKtScMoLyqc4dqXlHbJOqEil53+QP7qW+u281ax/TwHa2f2DMJ?= =?us-ascii?Q?Uq1DeMJotXsuVtcCmMCDt1PqWeXs9q5dyl9JjDcPu8ukIOny+u9yTU5It4LL?= =?us-ascii?Q?YZG4PVkoNcD/Ld3jt1Pb2wTSenTOoo/GU6Kv4fRH4SvDQi+J8DR4QEiNCWu5?= =?us-ascii?Q?1JJ4TMe6VxVavAv9kZ0JqGPC5J0OUtWf0PVlIjJv08GmqymKpACyVF3oDeTq?= =?us-ascii?Q?SqegzYqwPFvdLQpPu+UxBnKztBQER91crd4zcT6FtWZqWVcKsvmybmPdT+PZ?= =?us-ascii?Q?ujS3zhARiBgsYqFYuO1l6h6YMnM7d4wd1FRhheL/r/XGsOcO79/C6SQWkSPZ?= =?us-ascii?Q?IUkSwl0PAGRkWi6xPr38orJnscKqAMI?= X-Microsoft-Antispam-Message-Info: qdusS2Sh7RG0tVNSN6NRigDFhe4RVoLDD1deS7tm7QizAZxYUKY4POuVe2UULPkVUvLPMz4DHPeq17ezEIEgBkSq85a6rU+g8aa+38ua1110+FfBmWX2WOfXyyddP1KNl2gIQ4B7iDMnUszANFBKa5aR7HejLVWNDJEMw+nZCfmzhfs/j2oQMeBicy1HAWjhB8bIzf8z71EG7JCPAGgtr6oNZyhKUnJrl7txAM19ruIhj2oWSquY9Ta/5Lw7Dd0onTPiyO3wm6UuMTKLnbsLRb41L+zoeM5x+Ig35t9YI561zqQMBkTsprI/iQOOew7ZNVjVSvaOTs73ve9G6t1vPNbIoecAsrd5w4Qk5mn64MM= X-Microsoft-Exchange-Diagnostics: 1; SN1PR07MB1469; 6:EBR+yaihmMYLAcqNBH88uqfu+THLBNWJN6Gr+dfbthRELKYD4hOjcSwQZAxhSno1/v3HBcYZRqTHtyRrvHUt3OYDC/DH2xMxa6Zzr+PY7NA3ovuuiCdbZtykn3XaMCatyz2CVnBZduNafNx4BgjY/ZnzWru1fCF/CNFe7cjyM1IRVyUpjBbDLJ9g1grrN2NYnCVhrSmVXSOGzp0B5Du87nN0ZW9DFlOrkRxzDttjCAWT2zuMhZpvBKKInBp6IfV0QRu4HLUJfdHQL+Bjuqz7sif857MVPxyfbhYvKsZII2qaDvPY77LcNTnG7nIDC8LyrePYtdHX7t9sRDFkyC8uEwZVbVurAkFkBfKjb2tVIwYplC7DkDVPheZMZS5Kd4rDPbAtN/QnvId2igxAOx+8hwD7AyA7N6R4JS4xPZlzzYgbVeatQ574omEgIQuWJcY2wCgiQ6b6KIFkklzRCPxMfg==; 5:C5x3qDkCfdGPtUIZoZXdfrWmiZ4E9wvwwPOuYx3qtVtr2hbDtyDWiDb8Mk5dKAPGFW7HqicLtMqNoDqCxu/Hkwwd5Nxkp/UEzcJcqg6x+UbZpclqi9iajXdbGC2qkr1bWXMZnRqOjZG/ck7qVRNF+3PV3gQvWgHDrBsWDij+CiU=; 7:lA7WU7ZETVOMI6D1U5ZvSXBphfzYbPR+wFjU7csrlD8FQ+tXiEzmcrFNrjmD1CA3+vuE5hYn7sYr3lrrpvFYmspJ2V7ZWT1/U45r2b4y1JOX4jCVe9ioaE6LJvmrLRHqI8gN6exbC/V42sy6qh/giHysrtqzKFnX41qzKPC65jLAs9vA3VOfvKEO6mIWVqeV4OH/LBP17Fo4Oak0N1UxuAZsHS6nXAjGiefGF8Pw8v1kdXlKuURTAm4UXgbYGmur SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jul 2018 21:27:03.8343 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95a90f54-5d4c-49e8-e6f7-08d5ecf534e1 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: SN1PR07MB1469 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);