scsi: qedf: Initiate cleanup for ELS commands as well
Initiate cleanup for ELS commands as well. Link: https://lore.kernel.org/r/20200807110656.19965-6-jhasan@marvell.com Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Javed Hasan <jhasan@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
39d0357dd5
commit
1f6d1d4ca2
@ -1704,8 +1704,10 @@ void qedf_flush_active_ios(struct qedf_rport *fcport, int lun)
|
|||||||
io_req, io_req->xid);
|
io_req, io_req->xid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
qedf_initiate_cleanup(io_req, false);
|
||||||
flush_cnt++;
|
flush_cnt++;
|
||||||
qedf_flush_els_req(qedf, io_req);
|
qedf_flush_els_req(qedf, io_req);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Release the kref and go back to the top of the
|
* Release the kref and go back to the top of the
|
||||||
* loop.
|
* loop.
|
||||||
@ -2169,6 +2171,10 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req,
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (io_req->cmd_type == QEDF_ELS) {
|
||||||
|
goto process_els;
|
||||||
|
}
|
||||||
|
|
||||||
if (!test_bit(QEDF_CMD_OUTSTANDING, &io_req->flags) ||
|
if (!test_bit(QEDF_CMD_OUTSTANDING, &io_req->flags) ||
|
||||||
test_and_set_bit(QEDF_CMD_IN_CLEANUP, &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 "
|
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);
|
set_bit(QEDF_CMD_IN_CLEANUP, &io_req->flags);
|
||||||
|
|
||||||
|
process_els:
|
||||||
/* Ensure room on SQ */
|
/* Ensure room on SQ */
|
||||||
if (!atomic_read(&fcport->free_sqes)) {
|
if (!atomic_read(&fcport->free_sqes)) {
|
||||||
QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n");
|
QEDF_ERR(&(qedf->dbg_ctx), "No SQ entries available\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user