Message ID | 20171204224517.3409-10-himanshu.madhani@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> 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 3CF39600C5 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 4 Dec 2017 22:45:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EEFA29387 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 4 Dec 2017 22:45:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23BEA29446; Mon, 4 Dec 2017 22:45:52 +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 91BD429387 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 4 Dec 2017 22:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752464AbdLDWpu (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Mon, 4 Dec 2017 17:45:50 -0500 Received: from mail-cys01nam02on0077.outbound.protection.outlook.com ([104.47.37.77]:37524 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752283AbdLDWpl (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 4 Dec 2017 17:45:41 -0500 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=ro1dDmIYG9Obc7qemo3Ffuz2KOsIvpcD5lEeZX5jYME=; b=kUenLgzMH+uf081PQDudC6bm1pw/Tj6bjU5WM8EbBorzdgQ/O7Jm0+rx0LBJOqOqxuoure77x6ScuOgnUCgTBLtsm6Yr2NbsWuPsWVKMUy7z9GdyKh3GkoztfufOL1m944KtWLWZ//Gt38Usbo9IWws1fO++xubiaVgDWjuRhLY= Received: from CO2PR07CA0059.namprd07.prod.outlook.com (2603:10b6:100::27) by DM5PR0701MB3813.namprd07.prod.outlook.com (2603:10b6:4:7f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.5; Mon, 4 Dec 2017 22:45:39 +0000 Received: from BL2FFO11FD054.protection.gbl (2a01:111:f400:7c09::161) by CO2PR07CA0059.outlook.office365.com (2603:10b6:100::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.282.5 via Frontend Transport; Mon, 4 Dec 2017 22:45:39 +0000 Authentication-Results: spf=none (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: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11FD054.mail.protection.outlook.com (10.173.161.182) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.239.4 via Frontend Transport; Mon, 4 Dec 2017 22:45:39 +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, 4 Dec 2017 14:45:20 -0800 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 vB4MjJgo003481; Mon, 4 Dec 2017 14:45:19 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id vB4MjJIj003480; Mon, 4 Dec 2017 14:45:19 -0800 From: Himanshu Madhani <himanshu.madhani@cavium.com> To: <James.Bottomley@HansenPartnership.com>, <martin.petersen@oracle.com> CC: <himanshu.madhani@cavium.com>, <linux-scsi@vger.kernel.org> Subject: [PATCH v3 09/22] qla2xxx: Fix NPIV host cleanup in target mode Date: Mon, 4 Dec 2017 14:45:04 -0800 Message-ID: <20171204224517.3409-10-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20171204224517.3409-1-himanshu.madhani@cavium.com> References: <20171204224517.3409-1-himanshu.madhani@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(2980300002)(428002)(189002)(199003)(101416001)(8936002)(105586002)(189998001)(50226002)(80596001)(2950100002)(69596002)(50466002)(33646002)(1076002)(86362001)(54906003)(106466001)(110136005)(48376002)(6666003)(36756003)(76176011)(2906002)(4326008)(305945005)(356003)(5660300001)(8676002)(81156014)(81166006)(47776003)(51416003)(87636003)(316002)(42186006)(16586007)(72206003)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR0701MB3813; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD054; 1:Yg4c26Kr/13hdvd28ByO9oiKBG/ubAb+e+TTrGekyaI1vr6Fi7R1PPJ6H9HxhVEM3JndkfFdMSboCY3FE8Gv3gb6kQ2Edg9cVSeF/kuseC6I5H4MIdJmkXvgaueIRqD9 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1876dc9-0ee2-4a41-9e7a-08d53b68be1d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603286); SRVR:DM5PR0701MB3813; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3813; 3:NPzHSWjsUCeZc0xCvfO1yftJQzpxkFDH2Vt9UaVTIbaLtvai4m3FveScOH8PLEy72n/e2FftpfZIlC6xjfRAhAYBUsk1M6kQgXtcc/UteXih/sl7F5DW1/Cs6Do/biU0jD7K9SjsGBBA2BcZn6eodcf/Vs+ByC4OMVk4sKTWZa1AN8kim2Ma5qU23XPFpqR24Gm+87kQ1jV4LVO7DrokQGIET53nX/LCiqtcvFgTAenBnPSEvr+Py6AzsOdLShYiR0siD0n160EbiHaDJ06wvI6paEhmw++FRD21hMoDMIjO2scpNttaBBJcTnvkMxcBfsNzpWOtvHFWWFXRVIegf9SgCzBmCtdEqh1pckOAuaI=; 25:IblPcduOFa4ZO+qESq2d4womeXaP8JhkkovYwHuaqKAtBGE/ew6DrRvq2qarO9AKWD5kxXp/EyE/KFMmruTmiY3vpD6BF2Uv4VrghiRN+IspLE6G7KkC0a8UEdcL9LGO3a829eIEFbJyaLIpJMYKC2qkftIOWx+wnJvue6bZQ5uSR11ulD8R8fUKL8Xg5H5R9+jIQVLJ5xqvXEcBIDO+wQnL6r9OQnWUHx+NUYOqb887gLfmx0DJbhpOFksVX0L9gN0z04yh7ngLIb5DnnIisUafFpGYWtEApgbQ8aCcmcSY6ksCLCc69LdvHM2l91gEb+zrAtCCHNiYvj7vVunLrA== X-MS-TrafficTypeDiagnostic: DM5PR0701MB3813: X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3813; 31:HWX/pPyIaje6zOT1AGVdKjNNrCJthHOKA6xKyPbgzxxnjMH9O4u2lz7EhIt0GAp4AC9L5rHoq+xJ6Ic5ZjtD8xAcitG/ewNdYDFmuc083r+Po5r/JzQAoos3oZGjGxpBs6y31jbSSATQPUFj6AyAW44J0cu9NWxFXacxkx3x+YgVJVzJbcj/J4wWPXLCtwVYtcWsopsDsHKaTTLaTdeub9H9z7hRTxriTI+PorJJdYM=; 20:s36mm6b5VlAnBJmoqBKmSiP6LgUYHMXtcVJCtyq5pxRyhllHvh1FddsybpK/HKj6AUthJJwnWv8DRedUGP72Gsp/0wrbQcaZImKZm0hcl0VbovWUZpdkccJQG+f9HPx6YvbRNyAZ1oqSlpMxCGgpT0LsR/BjW4TvCInjTiCAdGJ1TAymn041xztWqY8TMOsK0Py8Y2YEta1vGOjTjwbbfo5Th6EC96T1EnHqau9RDccGjaZsPYwE9AEcyhDMjAmvAJDshfEK74b0ZE8w0YI44tAPDxHyc4TLateAiqKAmHpsd0mdV0hEB/IQlzwMW0woT/iEtJL/ETfiBc3jI9zrlCBt6K5Hf+bTn/12lifwosN723g8W1H6NaFzBrKQach6C1ZGNz3LesAjxC5XUR85xhgqjVB77EIGXIXJx8kneHapZd/A3j0pQO+s0VoDmPxZXlbbIJlKp//omxa6Wrde9zr1aVQaZCEcdq1t1BSq7iQI2uZJxkLCDtn1alvKSo8o X-Microsoft-Antispam-PRVS: <DM5PR0701MB38131BF44D465A94F93AC7EEF53C0@DM5PR0701MB3813.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(3231022)(3002001)(93006095)(93001095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123558100)(6072148)(201708071742011); SRVR:DM5PR0701MB3813; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR0701MB3813; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3813; 4:jAWXIbutW09licEp2/QSRty0Py5XZStZ758rJ3HwuHadrVjHZ5ZGIEVklFNUu0TVS63L2l3k5d2PhaUxY6AOGfV0UaGh3jMgCVCOvAdLk1IJKBOMCfkMmqPrIGsh8OMnrLlWVB9gHyglci0uMKdVi31nC6wGdEJY4o/Hh1zqrecNbkhWzTzXx71muXTbQqFMWSqcUPOdvyMU2cgoDg7nRL/y/66yNVlJFWDl0nQ6shnS3Spi3SRVEtRXI6mBRT4+heGzwricVk9lkck6jiGjpsEMdri0BrmGG6V1tmvU/suQNymsygQ044MIQT/MGsAc X-Forefront-PRVS: 051158ECBB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR0701MB3813; 23:iZVNmcQqVARvVoWkxw+FXHBbmqx8L9X51slWTpJ?= =?us-ascii?Q?6y3f6OMry8AfReqnzDGrtg2QCyrxT6M+w6QLzCe0BYkcZ5l4WKVkeBVVIBb1?= =?us-ascii?Q?kD3QHLdDDcxxsH1IiTd43uh2+/xIKOkdx1ImkVpLtQKxe4OmmsdWL/sPmHPV?= =?us-ascii?Q?GHDNH5TVM5FQaiv/kURjOpJuPVX/zF3mjjfPt/ky84u2X7Qkk5B8WwOozwTC?= =?us-ascii?Q?Eo96c4BIh3EUiSU4vpA7ejdjdPHfyKU3BL9myNbE5I42dnxbDTlQjBCPbNgD?= =?us-ascii?Q?b4NidiF1Tx0S26UHJe768E+o4J0yJN5k4IVxY3cYlXgds7XXbv45I3uIlzvz?= =?us-ascii?Q?YcultqOQEDh796+z4eC+WpiZAunditoYhyxATjJ2SV/mja0KTVG+TUw11D+F?= =?us-ascii?Q?djom65ABVUFIxChUzuqFb0sSYzynqSyuJI/hXUtibSvWJJj9SM33OXd660RG?= =?us-ascii?Q?UkbpK5tDVRilfXrD3sNGhroqAd19s/BFVmKu+lZSEDz4QwyY7QydgozjU/pH?= =?us-ascii?Q?rfqXbhp/TIuTgaXk5ic9lno0ZXj25PeZuAHsXgK5L/OSwjeocGCI8cQU9jnT?= =?us-ascii?Q?JstbTe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jgq7PYOjmL4gYNsNLr1Uoy9g=; 24:gu7gSmeGAorraDfnF27g+EU7WxFGbemm2J3aoRbs0eMJN2iffYPPUSkkbIPNqJJMYlHJLlR+ZmDc0AbJN5vsVPQxGOfxugwdkbKq6H5Ws2A=; 7:XtMYOYCCmN1lZPoE4/uwcF9sXTOgreNy38LlBR8ZucFKayRZJJcjACuZbAIcwKSElsTXtzLXw6GG7XBRKhCvSOTz1St5xJnKWv51WMr7u/+MVX/DLs6Fv4Q6FrWpPwUsyXUsLTxHBOtTB3U/EtslrZHLmhUj8bw7hZiVU4+37zvI63eDbGcbkOG+yi2mnK/bj4Re5VdX5ryCMKPOFx6+wylxyqSQussKfuLnr3ZFk9b5UwA05KAEQERuEHEsuvxS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2017 22:45:39.1454 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1876dc9-0ee2-4a41-9e7a-08d53b68be1d 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: DM5PR0701MB3813 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 924d58f5408f..1bec8aebb7b6 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1561,8 +1561,11 @@ static void qlt_release(struct qla_tgt *tgt) btree_destroy64(&tgt->lun_qpair_map); - if (ha->tgt.tgt_ops && ha->tgt.tgt_ops->remove_target) - ha->tgt.tgt_ops->remove_target(vha); + if (vha->vp_idx) + if (ha->tgt.tgt_ops && + ha->tgt.tgt_ops->remove_target && + vha->vha_tgt.target_lport_ptr) + ha->tgt.tgt_ops->remove_target(vha); vha->vha_tgt.qla_tgt = NULL;