summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedf/qedf_io.c
diff options
context:
space:
mode:
authorShyam Sundar <ssundar@marvell.com>2019-03-26 08:38:53 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2019-03-28 02:54:53 +0100
commitfeac47f507879f7b786fe4b1327fd09596518d7a (patch)
treee231a8ca43b01b02747cbb92c9c130b38849ff82 /drivers/scsi/qedf/qedf_io.c
parentscsi: qedf: Don't send ABTS for under run scenario (diff)
downloadlinux-feac47f507879f7b786fe4b1327fd09596518d7a.tar.xz
linux-feac47f507879f7b786fe4b1327fd09596518d7a.zip
scsi: qedf: Add a flag to help debugging io_req which could not be cleaned
- The flag will help in to figure out if io_req is cleaned or not. Signed-off-by: Shyam Sundar <ssundar@marvell.com> Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf/qedf_io.c')
-rw-r--r--drivers/scsi/qedf/qedf_io.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index 889b3008d5cf..4a792ea02d97 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -351,6 +351,11 @@ struct qedf_ioreq *qedf_alloc_cmd(struct qedf_rport *fcport, u8 cmd_type)
goto out_failed;
}
+ if (test_bit(QEDF_CMD_DIRTY, &io_req->flags))
+ QEDF_ERR(&qedf->dbg_ctx,
+ "io_req found to be dirty ox_id = 0x%x.\n",
+ io_req->xid);
+
/* Clear any flags now that we've reallocated the xid */
io_req->flags = 0;
io_req->alloc = 1;
@@ -1744,6 +1749,8 @@ free_cmd:
io_req->fcport == fcport) {
refcount =
kref_read(&io_req->refcount);
+ set_bit(QEDF_CMD_DIRTY,
+ &io_req->flags);
QEDF_ERR(&qedf->dbg_ctx,
"Outstanding io_req =%p xid=0x%x flags=0x%lx, sc_cmd=%p refcount=%d cmd_type=%d.\n",
io_req, io_req->xid,