summaryrefslogtreecommitdiff
path: root/drivers/scsi/qedf
diff options
context:
space:
mode:
authorSaurav Kashyap <skashyap@marvell.com>2019-03-26 00:38:54 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2019-03-27 21:54:53 -0400
commitf2c98af4a27ddd93c7fe1490a62feb363c953085 (patch)
tree0f3885dd383bc7f68b9890536a2be041e5192add /drivers/scsi/qedf
parentfeac47f507879f7b786fe4b1327fd09596518d7a (diff)
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: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedf')
-rw-r--r--drivers/scsi/qedf/qedf_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c
index 4a792ea02d97..ca7ca8c093c5 100644
--- a/drivers/scsi/qedf/qedf_io.c
+++ b/drivers/scsi/qedf/qedf_io.c
@@ -2174,7 +2174,8 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req,
/* If it TASK MGMT handle it, reference will be decreased
* 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);
io_req->sc_cmd = NULL;
complete(&io_req->tm_done);