From patchwork Tue Mar 5 10:58:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saurav Kashyap X-Patchwork-Id: 10839297 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 5D7E617E4 for ; Tue, 5 Mar 2019 11:00:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 498FD2B3F9 for ; Tue, 5 Mar 2019 11:00:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BFE72B5A5; Tue, 5 Mar 2019 11:00:07 +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 C77942B442 for ; Tue, 5 Mar 2019 11:00:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbfCELAG (ORCPT ); Tue, 5 Mar 2019 06:00:06 -0500 Received: from mail-eopbgr740051.outbound.protection.outlook.com ([40.107.74.51]:27710 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727450AbfCELAG (ORCPT ); Tue, 5 Mar 2019 06:00:06 -0500 Received: from BYAPR07CA0021.namprd07.prod.outlook.com (2603:10b6:a02:bc::34) by BYAPR07MB4376.namprd07.prod.outlook.com (2603:10b6:a02:c0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.19; Tue, 5 Mar 2019 11:00:03 +0000 Received: from BY2NAM05FT041.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::209) by BYAPR07CA0021.outlook.office365.com (2603:10b6:a02:bc::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1665.18 via Frontend Transport; Tue, 5 Mar 2019 11:00:03 +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 BY2NAM05FT041.mail.protection.outlook.com (10.152.100.178) 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:03 +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 02:59:58 -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 x25AxwGL013319; Tue, 5 Mar 2019 02:59:58 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x25AxwB7013309; Tue, 5 Mar 2019 02:59:58 -0800 From: Saurav Kashyap To: CC: , Subject: [PATCH 19/26] qedf: Don't queue anything if upload is in progress. Date: Tue, 5 Mar 2019 02:58:54 -0800 Message-ID: <20190305105901.13185-20-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: 131962572033282312;(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)(376002)(396003)(136003)(39860400002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(305945005)(11346002)(446003)(53936002)(126002)(48376002)(2616005)(47776003)(36756003)(81156014)(336012)(81166006)(8676002)(50466002)(2906002)(356004)(6666004)(1076003)(476003)(5660300002)(6862004)(26826003)(87636003)(498600001)(85426001)(69596002)(86362001)(16586007)(80596001)(486006)(2351001)(4326008)(26005)(14444005)(8936002)(51416003)(50226002)(68736007)(105606002)(36906005)(42186006)(76176011)(106466001)(316002)(97736004)(54906003);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR07MB4376;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: 9484c0c1-039c-4401-82d9-08d6a159b827 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600127)(711020)(4605104)(2017052603328);SRVR:BYAPR07MB4376; X-MS-TrafficTypeDiagnostic: BYAPR07MB4376: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0967749BC1 X-Microsoft-Exchange-Diagnostics: 1;BYAPR07MB4376;23:r+XLKMfDe46fDl7gZ+O8GEoUgpOgVLAIAC+9sJzdzAesbvnS3rCqZq8wM96lRznr2kQeW5CVVQGpQiIcuIatgeVg+HimmR69KEa4npCXNSsrxRVxoNqmObePCbkTeHlZTeK+5Wq0h64e2amsNJ46oJ0AMQnW07zEivIv415wS+E5Uzo5eGa3F+riO6GyWAJDsJ0briKPry0NtIW6mtG2xNF9uz9MUYVBSuimMGkBOr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phQa/FDXFjCHxzaxVTzQQiyF+je5XX09WrIWSKTdagYUnwSvc+v7aOBidO3EAujdyXO9jiTItZ/I60kFy9yyYTFc/dShb2c2iMTjktn93wD7N6+I4DV3BFkiunf1NOJcwxF8Oa1z2y1+zYZySj9hdOCyRAd445vdtwS8xsgv5B97y5b1td4aGU3nm0EyT6Jxb/zeOu8jmAi56gRk/YxaCYVX1pzjXH//4J8SPY9+oN1CJxOZd/IZ68smvyU5u6PqU+fnaHu4sZ6fHJsuLXUKvsylIVDQGd84p9fQ+TlaFLrQ1U2YIkc/4oBP2jRmSQIFlATnRcTS1fAG7yUOfW6ibLCPCM5H5MQlOAwG04dq31HKL5cDhwi6cXbulch7kc17Y4dUNCg1GPITTxOeGrnfHRsBMk1LlbduNLPm3j8Ug= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2019 11:00:03.0750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9484c0c1-039c-4401-82d9-08d6a159b827 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: BYAPR07MB4376 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: Shyam Sundar - I/Os, aborts and tmf should not be queued if flush is in progress. Signed-off-by: Shyam Sundar Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_io.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index 504ae02..30932a8 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -982,7 +982,8 @@ int qedf_post_io_req(struct qedf_rport *fcport, struct qedf_ioreq *io_req) /* rport and tgt are allocated together, so tgt should be non-NULL */ fcport = (struct qedf_rport *)&rp[1]; - if (!test_bit(QEDF_RPORT_SESSION_READY, &fcport->flags)) { + if (!test_bit(QEDF_RPORT_SESSION_READY, &fcport->flags) || + test_bit(QEDF_RPORT_UPLOADING_CONNECTION, &fcport->flags)) { /* * Session is not offloaded yet. Let SCSI-ml retry * the command. @@ -2401,6 +2402,12 @@ int qedf_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags) lport = qedf->lport; + if (test_bit(QEDF_RPORT_UPLOADING_CONNECTION, &fcport->flags)) { + QEDF_ERR(&qedf->dbg_ctx, "Connection is getting uploaded.\n"); + rc = SUCCESS; + goto tmf_err; + } + if (test_bit(QEDF_UNLOADING, &qedf->flags) || test_bit(QEDF_DBG_STOP_IO, &qedf->flags)) { rc = SUCCESS;