From patchwork Tue May 1 16:01:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10374143 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 A10826053D for ; Tue, 1 May 2018 16:02:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9124628426 for ; Tue, 1 May 2018 16:02:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85FCB28988; Tue, 1 May 2018 16:02:08 +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 208CC28426 for ; Tue, 1 May 2018 16:02:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755957AbeEAQCG (ORCPT ); Tue, 1 May 2018 12:02:06 -0400 Received: from mail-co1nam03on0052.outbound.protection.outlook.com ([104.47.40.52]:19872 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755825AbeEAQCD (ORCPT ); Tue, 1 May 2018 12:02:03 -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=FxomktWJywZjenv4Tx4kygxGsVNRnhYEVoSSKHX9LqU=; b=To8srMY7YroBU8+zHeuudNE1K53vNyc2cI27/IwEhGQ9BuSS5HL26fq5WB4s4lYVpnEabbB8TqvHByEopGh2mXSJpguVYO+Usj1O1+CRKC+xeLO7pDss6jE4eDQi20e9yY624a/v5fzMgHrV08MCrtrbzyBeXpmiBjvnJLKbzrs= Received: from DM5PR07CA0081.namprd07.prod.outlook.com (2603:10b6:4:ad::46) 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_CBC_SHA384_P256) id 15.20.715.20; Tue, 1 May 2018 16:02:01 +0000 Received: from BY2FFO11FD008.protection.gbl (2a01:111:f400:7c0c::188) by DM5PR07CA0081.outlook.office365.com (2603:10b6:4:ad::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.715.18 via Frontend Transport; Tue, 1 May 2018 16:02:01 +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 BY2FFO11FD008.mail.protection.outlook.com (10.1.14.159) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.696.11 via Frontend Transport; Tue, 1 May 2018 16:02:01 +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, 1 May 2018 09:02:00 -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 w41G1tGq027966; Tue, 1 May 2018 09:01:55 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w41G1tXf027965; Tue, 1 May 2018 09:01:55 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 04/12] qla2xxx: Delete session for nport id change Date: Tue, 1 May 2018 09:01:46 -0700 Message-ID: <20180501160154.27915-5-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180501160154.27915-1-himanshu.madhani@cavium.com> References: <20180501160154.27915-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)(376002)(39860400002)(346002)(2980300002)(438002)(189003)(199004)(6666003)(86362001)(4326008)(11346002)(87636003)(476003)(106002)(305945005)(486006)(478600001)(36756003)(72206003)(50466002)(2616005)(2906002)(48376002)(446003)(1076002)(50226002)(126002)(106466001)(110136005)(51416003)(26005)(54906003)(16586007)(336012)(59450400001)(47776003)(8936002)(8676002)(44832011)(69596002)(42186006)(76176011)(316002)(186003)(81166006)(356003)(81156014)(80596001)(5660300001); 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; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD008; 1:4TsdnMp71mOuUBdimHnngh0G6mh/KlGo7TMg97DZMc92i6zUFLhVQWaI4Pf0X3bwqGK8xb7qWBQiRqOodj+XTILyjrmBq/xf278JbLn1XP54TH7mQnbL4995JRcAgj8J X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4608076)(2017052603328)(7153060); S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l3Zng3LBY3jUeyltGuDkzuDdApu3m6HWishI1F3Q6B2lUN3EcGwUJUch7B5/wRGTQvzWcHtFOsHW4caYlPZ7kWqqoHW26zsgP/D23kqGt5o4PvyfMMrq8USkO1BuRqrBL6XgblG3QHRdxyVYkAz+zKV1l/vg1/b0EQImEmHLACrFV9Ifc+yULbzJmXvj5KbGHskBkI+81eKdo/OeuIrbCbZcqVdJzc2FnCSkCyOagxRQGPyQin5xc+LSa4moBI6HmeOUty1CdSw4SyKMr+S0nidLx6igZ0U27LbILjicCt0PdprhTjSDWN2eW23CZoEoRaq7yxrb38KvGqUn0TmicSHpTDb7r72mi9Gzg1JZp5M4eyEDmx+SZv8XZ7WruYBQDir3TUri50vTsOH+Uxp19KO82z7k9MJey2AqWYW0Lz6Fzh8fvKALH0LFU0dZeJg9OcVTG7KIT+6Ewo7EKkXjbM1643HF6vJE4qxS9fWTZe2CY/KgWy; 4:zF7iaRhYP7uLI1FAzVOmNn+qnGoik3svU67905+ZBgDZbt5B2rZ3RtB0cQRt0b+/Fi2xFTYN/KgW85Cjjrx3EsHL/Dg5FLu9VhzEuEybJ4y50o8pySGP6lC9AVPlGs2gepiBALEejcy2JL/DBeHQyUUg0OibihBy+Yw1W8sjhdABevH4LWzsdCfIs7SvUWgHajVmAhC0SbjQaMQZuzJMDGj8/nEUTPdJE36VJoYjEc29MyckoZNhu2jcy8GWoQt3wARiDz9/zGc98fbRD4tEA446KpZeodbgMN5awqnOfcFp1Qbe90+JgUdoBA1Sq0A/ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93004095)(3231254)(944501410)(52105095)(6041310)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:MWHPR07MB3181; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3181; X-Forefront-PRVS: 06592CCE58 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3181; 23:dQEbOasph1yLtqwQn/KFMgEgg/SGiJzQoHzh6ozJd?= =?us-ascii?Q?H7InzjD0GLarozR5p/IHuzjUSL5QzwUmlHy/XCSDM/w2GBiaASDcVL4NjTK9?= =?us-ascii?Q?zaweGy6hT20ruwxEXNo7l9/oSHnU/TpLj0I03fQFSmbXfTjQTtHbna75W8Wq?= =?us-ascii?Q?FVyHKX1ke0zoBfJ78b13b19z8DO+xrzhMzfeTqS0QNMZ86Fs6DifTRcfwAvN?= =?us-ascii?Q?/YWKH3WWFHtbC5NrUh80wTkinnnSdxI8ozaxkJIuAZq9rgnK2u4B+2PD5md/?= =?us-ascii?Q?rZRUgp6u3c6eK4Y6/MPzepocBQfvfKlG/u9VKuXHL+sqBXVSgN4KYv4g48Uh?= =?us-ascii?Q?+ZyPrrfRENB2WF6lVgYTNhdEeRuZeetLEQHiGnGWs4bNgfrQ0hPoWAXRg03Y?= =?us-ascii?Q?n4GLjJrjjBrAmspzy8DbWqdy1k5vmpsx1gjPa1B25mvAC9mGdKh1r3LTyi6b?= =?us-ascii?Q?RD2ibvM/D3Iv5IFTp0MMzGcuUlMSFW+IpHDiAueEx0uO76MBZUbAuRwSKgCl?= =?us-ascii?Q?mlQ4yKXscbvIaEDjZcjpqPK8y2IwuRyVu8jjRDgjylH2FQvAcFTM9iZxV8vF?= =?us-ascii?Q?VtHJtcsNnNj0bSoG70TZNPX+oXetIsljaoyj7WypO0b6lEObakWTD9AsjJKV?= =?us-ascii?Q?P/vaPvyPJHJn4x1nERyWZZt4wNA4iasnoUJvLXV2Y4SeH4e8+Lkg9V0Rz4in?= =?us-ascii?Q?RMYtwS69Vs59qHIvdyQA8iaU0VFXQV7XhoUSO38LvzQYCUCoJ2xdVXLs8VXE?= =?us-ascii?Q?sJQBYk0JDj6EITZtI0D7KvG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mJ0/zUt5qs8rRPyBuGnbHw1tWsyeAF9Yu7NOOOnccjkTHTdnkD3LmH1/ghfSGQJeQ9YVO5C1shvfp1lLBwOE72KrypBMStizMNg==; 5:tfhzhrlZhqd3rqqM92xECGzsyerzdJRW1Kfu63kN1W4cYs7aQ5XE9R/qEgRzTu/hCmeykQgf8A65q9A0cgkTA8CGxE9Nz+Ul9v/9j8nRBy0jDWzGZvCKhVVCAEOV9AEKHaz2Giks4AqHvAoEh7LSAvYkNmlM8mbBd2ysiuqzyFM=; 24:RWjzlGKYmRZCRoFWvM+xRibNgCJt2QqgqKnVtVJlusFjms5ll+OEFP8bLaZdJ/cvGgHdmoN5D+7sbYXiM/ogpd2/x3IqD5F8Ut0dqhrqHRw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3181; 7:KzESUH/9Xf5Xp4xdgwUj7xecZ+bbNsEuiKQ/EU914VHaIvah0T9sykXepRVttMHvW1vxANKdtGIMG4c1z7MG0kVIjxiZil8N4+RORyHTNwqs3DI9qL3fr3gWHwTgoWzeXbNA2zTNhV3SBSP0gchEbYhbT/oDwqU/7rQtyXtgvIvJKfOxHgUW+8roHCoj76Mp6tPHSHDve45uSXoHW2ce0L3Md2pgULsD8/QJJCQJ39p4PWP8xma62RNnZLYeMunh X-MS-Office365-Filtering-Correlation-Id: 2edceb42-1148-40e8-a558-08d5af7ce011 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2018 16:02:01.0823 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2edceb42-1148-40e8-a558-08d5af7ce011 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 This patch fixes regression introduced by commit a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery"). to schedule session deletion, when Nport ID changes. Fixes: a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery") Cc: Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 9e914f9c3ffb..05abe5aaab7f 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3915,7 +3915,6 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) if (memcmp(rp->port_name, fcport->port_name, WWN_SIZE)) continue; fcport->scan_state = QLA_FCPORT_FOUND; - fcport->d_id.b24 = rp->id.b24; found = true; /* * If device was not a fabric device before. @@ -3923,7 +3922,10 @@ void qla24xx_async_gnnft_done(scsi_qla_host_t *vha, srb_t *sp) if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) { qla2x00_clear_loop_id(fcport); fcport->flags |= FCF_FABRIC_DEVICE; + } else if (fcport->d_id.b24 != rp->id.b24) { + qlt_schedule_sess_for_deletion(fcport); } + fcport->d_id.b24 = rp->id.b24; break; }