From patchwork Fri Jan 25 07:23:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10780713 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 6AC4913BF for ; Fri, 25 Jan 2019 07:25:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 501962EF03 for ; Fri, 25 Jan 2019 07:25:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 443942EF2A; Fri, 25 Jan 2019 07:25:23 +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,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 DB26D2EF03 for ; Fri, 25 Jan 2019 07:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727507AbfAYHZW (ORCPT ); Fri, 25 Jan 2019 02:25:22 -0500 Received: from mail-eopbgr810080.outbound.protection.outlook.com ([40.107.81.80]:48544 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727034AbfAYHZW (ORCPT ); Fri, 25 Jan 2019 02:25:22 -0500 Received: from DM5PR07CA0039.namprd07.prod.outlook.com (2603:10b6:3:16::25) by BYAPR07MB4759.namprd07.prod.outlook.com (2603:10b6:a02:f0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1558.16; Fri, 25 Jan 2019 07:25:19 +0000 Received: from DM3NAM05FT037.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::203) by DM5PR07CA0039.outlook.office365.com (2603:10b6:3:16::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1558.17 via Frontend Transport; Fri, 25 Jan 2019 07:25:19 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by DM3NAM05FT037.mail.protection.outlook.com (10.152.98.150) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1580.2 via Frontend Transport; Fri, 25 Jan 2019 07:25:18 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Thu, 24 Jan 2019 23:24:15 -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 x0P7OEuo003575; Thu, 24 Jan 2019 23:24:14 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x0P7OEYh003574; Thu, 24 Jan 2019 23:24:14 -0800 From: Himanshu Madhani To: , CC: , Subject: [PATCH 07/13] qla2xxx: allow session delete to finish before create. Date: Thu, 24 Jan 2019 23:23:45 -0800 Message-ID: <20190125072351.3504-8-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190125072351.3504-1-hmadhani@marvell.com> References: <20190125072351.3504-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131928747190622968;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(396003)(136003)(346002)(376002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(69596002)(316002)(54906003)(4326008)(498600001)(87636003)(110136005)(36756003)(26826003)(42186006)(50466002)(16586007)(80596001)(48376002)(336012)(97736004)(26005)(356004)(6666004)(76176011)(486006)(106466001)(105606002)(446003)(2616005)(51416003)(11346002)(476003)(126002)(47776003)(68736007)(8936002)(85426001)(1076003)(4744005)(50226002)(305945005)(36906005)(53936002)(81166006)(8676002)(81156014)(14444005)(86362001)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB4759;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT037;1:LY5wBJqMz3DRuDOQUVcq1XnBuyhvXyUEnjfaF2w/VrsQtS604ofsdY+H23dVNFPH3gJ3fdz1Wjwhqnsywu4bNIWO6TCD+kKueaLqhsPUj94OXiO6gQrisDIvd4+qFMhh48tNyhN6eQw8cxA33Tgo8A== X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eba48cbe-dc1d-49b2-aa01-08d682964264 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600110)(711020)(4605077)(2017052603328);SRVR:BYAPR07MB4759; X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4759;3:voJyQ0IXtCxnn7fjvCfY4Pcw4bhO2++otuGLriGU6WSaF8m0YOau+WGmVhGTInjKjtr7rLWovMuvw2KFdXYwuFeNFR14s9JTwrNFF0el5no1akE7fKkmpwCz+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EOk/bCe2p8YDrzvb/+cQvHy7qRCLhVI+O0XrJ3JuktrM+3bxEgtcjBs/kUQld5OfmDljtJclJP2lENYv0m13y8e+ZLpMD1MRkyG471LF0k2BfbjgrAbBUdxg6URPkgFrJ24XAKAtTeNa9ZSTdF5Uz5OMNdl0Y5ECrsQKYFb7p/J9qiopNgHmTC7KNYCmSkF37fv9A6ssBm0ZkGJAioKa3BKD+h+i4K1IJGg1Wyvsxb/6oDSfWXRJZddSvbcEUECgN2IErry9w==;5:mSajdJzEed998hmBFHZDEEvkKLmII6TwnHKBbDy9q8UPv4rxRc1W0jS9HxKc/K1XaO08w6S0bWXKdL8OIAJJgQxzIIEBuX9HU0r8jct7cLphoMWDK7e/aQ0bIK8lZ2YGBc9VorFf2IYx5G61EVTPUc4gsSdrVKo2ieYLJEnMsQmIc7grV/5xcVAC1eeuymcIkuiUYUON+VvbWXU1dMzQ/Q==;7:F1vqcpu/ivehbs4GPMSytFlxuGjY380YajVHGbqAaD+OuS6EMY3PI7PvGeP9aeLEtSDXjvqdF0eA2GsI9RRY8K5XptUM7nSQ7JOsUoim625FZkYKJ1NMRE7yti6RVrUssRt41p7NlZhm1SyLQEGT9w== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2019 07:25:18.6789 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: eba48cbe-dc1d-49b2-aa01-08d682964264 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4759 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 flushes del_work and free_work while sending NACK response for PRLI Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 8bc4c651af68..5d939a48f3d5 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -684,6 +684,9 @@ void qla24xx_do_nack_work(struct scsi_qla_host *vha, struct qla_work_evt *e) switch (e->u.nack.type) { case SRB_NACK_PRLI: + t = e->u.nack.fcport; + flush_work(&t->del_work); + flush_work(&t->free_work); mutex_lock(&vha->vha_tgt.tgt_mutex); t = qlt_create_sess(vha, e->u.nack.fcport, 0); mutex_unlock(&vha->vha_tgt.tgt_mutex);