From patchwork Tue Mar 5 10:58:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saurav Kashyap X-Patchwork-Id: 10839303 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 5B72A1390 for ; Tue, 5 Mar 2019 11:00:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48E522B604 for ; Tue, 5 Mar 2019 11:00:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D2162B67F; Tue, 5 Mar 2019 11:00:26 +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 2EBA02B442 for ; Tue, 5 Mar 2019 11:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727484AbfCELAY (ORCPT ); Tue, 5 Mar 2019 06:00:24 -0500 Received: from mail-eopbgr760083.outbound.protection.outlook.com ([40.107.76.83]:27016 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727401AbfCELAY (ORCPT ); Tue, 5 Mar 2019 06:00:24 -0500 Received: from DM6PR07CA0041.namprd07.prod.outlook.com (2603:10b6:5:74::18) by BN7PR07MB4370.namprd07.prod.outlook.com (2603:10b6:406:b5::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.15; Tue, 5 Mar 2019 11:00:22 +0000 Received: from BY2NAM05FT020.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::209) by DM6PR07CA0041.outlook.office365.com (2603:10b6:5:74::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1665.20 via Frontend Transport; Tue, 5 Mar 2019 11:00:22 +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 BY2NAM05FT020.mail.protection.outlook.com (10.152.100.157) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1686.5 via Frontend Transport; Tue, 5 Mar 2019 11:00:22 +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; Tue, 5 Mar 2019 03:00:08 -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 x25B08ai013420; Tue, 5 Mar 2019 03:00:08 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x25B08jE013419; Tue, 5 Mar 2019 03:00:08 -0800 From: Saurav Kashyap To: CC: , Subject: [PATCH 22/26] qedf: Check for tm_flags instead of cmd_type during cleanup. Date: Tue, 5 Mar 2019 02:58:57 -0800 Message-ID: <20190305105901.13185-23-skashyap@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190305105901.13185-1-skashyap@marvell.com> References: <20190305105901.13185-1-skashyap@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131962572223045182;(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)(346002)(39860400002)(376002)(136003)(396003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(106466001)(47776003)(53936002)(2351001)(48376002)(50466002)(36756003)(8936002)(8676002)(105606002)(50226002)(81166006)(81156014)(26826003)(80596001)(498600001)(87636003)(69596002)(316002)(16586007)(42186006)(85426001)(54906003)(36906005)(2906002)(5660300002)(305945005)(68736007)(4744005)(1076003)(14444005)(76176011)(6862004)(11346002)(2616005)(4326008)(446003)(486006)(336012)(26005)(476003)(51416003)(126002)(86362001)(97736004)(6666004)(356004);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR07MB4370;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: be13a125-afde-490a-e8c9-08d6a159c376 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600127)(711020)(4605104)(2017052603328);SRVR:BN7PR07MB4370; X-MS-TrafficTypeDiagnostic: BN7PR07MB4370: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0967749BC1 X-Microsoft-Exchange-Diagnostics: 1;BN7PR07MB4370;23:BTohc3YBct8HryIZ/HJ7FJ4ut7j6MHK+kFnjxQlCgRlqZukOtyiPrLCQC02BuiBsnoZZCbCXbAWrvQIr08XQPRdcKpcshPyypDmenN+6KpquC+b1RBlRzKs8R3QlMesJoDJVJnF/Yt4p6MTZaK37t6QHRenyodf7gRgNGd+K7zsFadEPBFmfQE45jKOZK1S6bwC4/bo7zodUXs4NlfHRfs++08Fcdoeclw+C0VEqG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Info: FSGRhE+qkId4/7DdP4/MnQ/SeAZAcurpymPLXLVue/VnNvX69Gu/5bv6Hz6y6TaLA5weMvPGRcmqc47HgpqxRd0IS9Ogd9MRNmCZdz2TmmRONsBhQHOqyNaoGzY9UheIEBQN74zZZ4SqRuUmGbPIClqmmAliLGBRXCQLOP1OIFiElYpOjXlukbJmFdNDfIR+dPJoSi+6tPCVD30jDW1gKiQ0wQ6UTuf/qEov2M80UIgSfJxOtUu137+JQ2JFQRJgZ1rhffZNhfvBB5r0TOtDrFrbT97wxOjzoGLUYw8zMJvKZ1nxCiAVuzgOyINJWGcYhucUaAcBdaSRQ+9n2cyFLaLU7pVFY9YbP6+W9w5qnqB5czFHb20YUbuNdi9XMg56TaTImxbrAv99eVQOmjuFqW1foKqz27ghkCJD0yNEiI4= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2019 11:00:22.0493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be13a125-afde-490a-e8c9-08d6a159c376 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: BN7PR07MB4370 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 cmd_type is over written to QEDF_CLEANUP during cleanup, so check for tm_flags. Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index 90d1645..d8d55bc 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -2174,7 +2174,8 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, /* If it TASK MGMT handle it, reference will be decreased * in qedf_execute_tmf */ - if (io_req->cmd_type == QEDF_TASK_MGMT_CMD) { + if (io_req->tm_flags == FCP_TMF_LUN_RESET || + io_req->tm_flags == FCP_TMF_TGT_RESET) { clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags); io_req->sc_cmd = NULL; complete(&io_req->tm_done);