From patchwork Fri Aug 7 11:06:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257974 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF54DC433E1 for ; Fri, 7 Aug 2020 11:13:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C23B32177B for ; Fri, 7 Aug 2020 11:13:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="h2vJMjtI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728064AbgHGLNl (ORCPT ); Fri, 7 Aug 2020 07:13:41 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:43628 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728004AbgHGLJQ (ORCPT ); Fri, 7 Aug 2020 07:09:16 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 077AoTUb009561 for ; Fri, 7 Aug 2020 04:08:34 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=mKbdG4A0hvySNwGCtBg++ey3IZP5mgcf7HF0afXNbaU=; b=h2vJMjtIP/gKuiYNhbGrpPq6p53/KZDVo5wMhLo9EYT0F863+FcBvrFbS/E3sERMMu2+ KFJqNKzZUdRJQb00blq62dVps+wICbYIMHg4YLwS1itXxlpFMDh3Hhhf9C4CMaGdTibF wDyVLIKh7LHDiZ2tnctCF2UWSPHswpUCJEmwIYBFCWaRwAeM07ozIsI5hRHp8iCtNafY 0uynC4gJOMY27tQ+1KXw19205iatEr00YzCU4FIgDneJkvERMrPXG2oNLTOvCgZVvao8 XXTLudHqjebwkD+EinTRnHxlUeboOWiMrwnNlX3o+reYH7/b4Sa+5Eq6CQELutH/+pYi Tg== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 32s3c98gbg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 07 Aug 2020 04:08:34 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 Aug 2020 04:08:32 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 7 Aug 2020 04:08:33 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 0E03A3F703F; Fri, 7 Aug 2020 04:08:33 -0700 (PDT) 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 077B8WKW020020; Fri, 7 Aug 2020 04:08:32 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 077B8WLO020019; Fri, 7 Aug 2020 04:08:32 -0700 From: Javed Hasan To: CC: , , Subject: [PATCH 3/7] qedf: Do not kill timeout work for original IO on RRQ completion. Date: Fri, 7 Aug 2020 04:06:52 -0700 Message-ID: <20200807110656.19965-4-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200807110656.19965-1-jhasan@marvell.com> References: <20200807110656.19965-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-07_06:2020-08-06,2020-08-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap -The timer is already cancelled when abort get completed, hence no need of cancelling it again. Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_els.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/qedf/qedf_els.c b/drivers/scsi/qedf/qedf_els.c index ab4b1a9..edd6702 100644 --- a/drivers/scsi/qedf/qedf_els.c +++ b/drivers/scsi/qedf/qedf_els.c @@ -185,10 +185,6 @@ static void qedf_rrq_compl(struct qedf_els_cb_arg *cb_arg) goto out_free; } - if (rrq_req->event != QEDF_IOREQ_EV_ELS_TMO && - rrq_req->event != QEDF_IOREQ_EV_ELS_ERR_DETECT) - cancel_delayed_work_sync(&orig_io_req->timeout_work); - refcount = kref_read(&orig_io_req->refcount); QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "rrq_compl: orig io = %p," " orig xid = 0x%x, rrq_xid = 0x%x, refcount=%d\n", From patchwork Fri Aug 7 11:06:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257975 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07847C433DF for ; Fri, 7 Aug 2020 11:11:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9B7022C9F for ; Fri, 7 Aug 2020 11:11:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="xmQpPgGj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728219AbgHGLL2 (ORCPT ); Fri, 7 Aug 2020 07:11:28 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:59128 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728159AbgHGLJ1 (ORCPT ); Fri, 7 Aug 2020 07:09:27 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 077ApApJ021074 for ; Fri, 7 Aug 2020 04:09:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=PAGFjWAEDaoPA8v8ak+Zqw+nuelGQn3JlK7ZCXhM7Lo=; b=xmQpPgGjapsLprHj87aiFA4ZQndV6ZLNJPobuF6VYViAJaIss0PHTYBWlqNwWUHGS05i hkFZFG5WfGAdum9/ygdoatJstk4faabrvicJX9LbgH2DXGrXB9Z2brnc8ID6i7fl25wN 55FKX+GIcwNtDZD5exRaC1pd1VBDLn8nwgog2GRnsnvT9C+EwBqjhFrfhugMg/XSa8vz 8sZspJdu0KR7ZMb36BrCVJzOzDvxxEGgVyezzRl3wsxTn9hZXvB8F828mINrCf8XW/co C6L+To4LH8NZKH0fBzxXYXmsszegjCJuylM9qp4a165qcxDcf/HvtBaHBMLdmNjrNmKi dA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 32n6ch1f1q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 07 Aug 2020 04:09:22 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 Aug 2020 04:09:21 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 7 Aug 2020 04:09:21 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 50A7E3F703F; Fri, 7 Aug 2020 04:09:21 -0700 (PDT) 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 077B9LbG020037; Fri, 7 Aug 2020 04:09:21 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 077B9LAU020036; Fri, 7 Aug 2020 04:09:21 -0700 From: Javed Hasan To: CC: , , Subject: [PATCH 5/7] qedf: Initiate cleanup for ELS commands as well. Date: Fri, 7 Aug 2020 04:06:54 -0700 Message-ID: <20200807110656.19965-6-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200807110656.19965-1-jhasan@marvell.com> References: <20200807110656.19965-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-07_06:2020-08-06,2020-08-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap Initiate cleanup for ELS commands as well. Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_io.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index 26d11cc..7969f3a 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -1704,8 +1704,10 @@ void qedf_flush_active_ios(struct qedf_rport *fcport, int lun) io_req, io_req->xid); continue; } + qedf_initiate_cleanup(io_req, false); flush_cnt++; qedf_flush_els_req(qedf, io_req); + /* * Release the kref and go back to the top of the * loop. @@ -2169,6 +2171,10 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, return SUCCESS; } + if (io_req->cmd_type == QEDF_ELS) { + goto process_els; + } + if (!test_bit(QEDF_CMD_OUTSTANDING, &io_req->flags) || test_and_set_bit(QEDF_CMD_IN_CLEANUP, &io_req->flags)) { QEDF_ERR(&(qedf->dbg_ctx), "io_req xid=0x%x already in " @@ -2178,6 +2184,7 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, } set_bit(QEDF_CMD_IN_CLEANUP, &io_req->flags); +process_els: /* Ensure room on SQ */ if (!atomic_read(&fcport->free_sqes)) { QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n"); From patchwork Fri Aug 7 11:06:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javed Hasan X-Patchwork-Id: 257976 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59446C433DF for ; Fri, 7 Aug 2020 11:11:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3634322C9F for ; Fri, 7 Aug 2020 11:11:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=marvell.com header.i=@marvell.com header.b="FCefS3kL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728321AbgHGLLF (ORCPT ); Fri, 7 Aug 2020 07:11:05 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:13384 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728165AbgHGLKV (ORCPT ); Fri, 7 Aug 2020 07:10:21 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 077AoCEH009453 for ; Fri, 7 Aug 2020 04:09:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0818; bh=YJZwpTBfxP2ClPw+2v05lP+q+OwXiWMVmX8XNIhlA6o=; b=FCefS3kL3G5KYCCZAx90tU2qVZgjZ3UadsNo/Xe3W4R0WklmEM0T3Y0YH7EmPqw6+2Wh nmZHHYoP9Vl4M7akYQLBtGy2NTrAQog+ST9JUDaTPJ+po/K5unppjXW4r2eYJwwMJ81g YhmpJTUDzblAwNjCFh7wIYLf0tyxQpRKO4E1xfxj9xk1BvKbiionxEuVPCfgE9cGCkLH 5J6lV2J3ADJ8reLDOV6a4JxQqA2GeJZJl2TQICkiUsiEbklR69m3ejucdO+5s7X0gYrw c7eP8Rt+few9f0Pjl7Zuk+Ve9JtrfqKTofAja3nX3pcMBaHsL6pxIm5Ah7CIscJgVoYT 4g== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 32s3c98geg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 07 Aug 2020 04:09:47 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 Aug 2020 04:09:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 7 Aug 2020 04:09:45 -0700 Received: from dut1171.mv.qlogic.com (unknown [10.112.88.18]) by maili.marvell.com (Postfix) with ESMTP id 6C27E3F703F; Fri, 7 Aug 2020 04:09:45 -0700 (PDT) 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 077B9jrK020049; Fri, 7 Aug 2020 04:09:45 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id 077B9jYF020040; Fri, 7 Aug 2020 04:09:45 -0700 From: Javed Hasan To: CC: , , Subject: [PATCH 6/7] qedf: Don't process ELS completion if its flushed or cleaned up. Date: Fri, 7 Aug 2020 04:06:55 -0700 Message-ID: <20200807110656.19965-7-jhasan@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20200807110656.19965-1-jhasan@marvell.com> References: <20200807110656.19965-1-jhasan@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-07_06:2020-08-06,2020-08-07 signatures=0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Saurav Kashyap - Don't process ELS completion if its flushed or cleaned up. Signed-off-by: Saurav Kashyap Signed-off-by: Javed Hasan --- drivers/scsi/qedf/qedf_els.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/qedf/qedf_els.c b/drivers/scsi/qedf/qedf_els.c index edd6702..e2e80ea 100644 --- a/drivers/scsi/qedf/qedf_els.c +++ b/drivers/scsi/qedf/qedf_els.c @@ -147,6 +147,15 @@ void qedf_process_els_compl(struct qedf_ctx *qedf, struct fcoe_cqe *cqe, QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Entered with xid = 0x%x" " cmd_type = %d.\n", els_req->xid, els_req->cmd_type); + if ((els_req->event == QEDF_IOREQ_EV_ELS_FLUSH) + || (els_req->event == QEDF_IOREQ_EV_CLEANUP_SUCCESS) + || (els_req->event == QEDF_IOREQ_EV_CLEANUP_FAILED)) { + QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, + "ELS completion xid=0x%x after flush event=0x%x", + els_req->xid, els_req->event); + return; + } + clear_bit(QEDF_CMD_OUTSTANDING, &els_req->flags); /* Kill the ELS timer */