[6/7] qedf: Don't process ELS completion if its flushed or cleaned up.
diff mbox series

Message ID 20200807110656.19965-7-jhasan@marvell.com
State Superseded
Commit 49cf23e02935490bef868fcbd3e4b0bf648f3b6d
Headers show
Series
  • qedf: Misc fixes for the driver.
Related show

Commit Message

Javed Hasan Aug. 7, 2020, 11:06 a.m. UTC
From: Saurav Kashyap <skashyap@marvell.com>

  - Don't process ELS completion if its flushed or cleaned up.

Signed-off-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Javed Hasan <jhasan@marvell.com>
---
 drivers/scsi/qedf/qedf_els.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Patch
diff mbox series

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 */