Commit f2c98af4 authored by Saurav Kashyap's avatar Saurav Kashyap Committed by Martin K. Petersen

scsi: qedf: Check for tm_flags instead of cmd_type during cleanup

cmd_type is over written to QEDF_CLEANUP during cleanup, so check for
tm_flags.
Signed-off-by: default avatarSaurav Kashyap <skashyap@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent feac47f5
...@@ -2174,7 +2174,8 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, ...@@ -2174,7 +2174,8 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req,
/* If it TASK MGMT handle it, reference will be decreased /* If it TASK MGMT handle it, reference will be decreased
* in qedf_execute_tmf * in qedf_execute_tmf
*/ */
if (io_req->cmd_type == QEDF_TASK_MGMT_CMD) { if (io_req->tm_flags == FCP_TMF_LUN_RESET ||
io_req->tm_flags == FCP_TMF_TGT_RESET) {
clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags); clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags);
io_req->sc_cmd = NULL; io_req->sc_cmd = NULL;
complete(&io_req->tm_done); complete(&io_req->tm_done);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment