Skip to content

Commit a96feef

Browse files
Anil Gurumurthygregkh
authored andcommitted
scsi: qla2xxx: Return error when TMF returns
commit b4146c4 upstream. Propagate the task management completion status properly to avoid unnecessary waits for commands to complete. Fixes: faef62d ("[SCSI] qla2xxx: Fix Task Management command asynchronous handling") Cc: <[email protected]> Signed-off-by: Anil Gurumurthy <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f70766f commit a96feef

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,11 +1326,10 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
13261326

13271327
wait_for_completion(&tm_iocb->u.tmf.comp);
13281328

1329-
rval = tm_iocb->u.tmf.comp_status == CS_COMPLETE ?
1330-
QLA_SUCCESS : QLA_FUNCTION_FAILED;
1329+
rval = tm_iocb->u.tmf.data;
13311330

1332-
if ((rval != QLA_SUCCESS) || tm_iocb->u.tmf.data) {
1333-
ql_dbg(ql_dbg_taskm, vha, 0x8030,
1331+
if (rval != QLA_SUCCESS) {
1332+
ql_log(ql_log_warn, vha, 0x8030,
13341333
"TM IOCB failed (%x).\n", rval);
13351334
}
13361335

0 commit comments

Comments
 (0)