Skip to content

Commit

Permalink
scsi: hisi_sas: add TMF success check
Browse files Browse the repository at this point in the history
When a tmf is issued, various response codes can be returned from the
target. For a query tmf the response may be TMF_RESP_FUNC_COMPLETE or
TMF_RESP_FUNC_SUCC.  Add a condition for TMF_RESP_FUNC_SUCC to
hisi_sas_exec_internal_tmf_task().  This affects query tmf, as the
result is success the returned value was for failure.

Signed-off-by: John Garry <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
John Garry authored and martinkpetersen committed Aug 26, 2016
1 parent 9859f24 commit 4ffde48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/scsi/hisi_sas/hisi_sas_main.c
Original file line number Diff line number Diff line change
@@ -743,6 +743,12 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device,
break;
}

if (task->task_status.resp == SAS_TASK_COMPLETE &&
task->task_status.stat == TMF_RESP_FUNC_SUCC) {
res = TMF_RESP_FUNC_SUCC;
break;
}

if (task->task_status.resp == SAS_TASK_COMPLETE &&
task->task_status.stat == SAS_DATA_UNDERRUN) {
/* no error, but return the number of bytes of

0 comments on commit 4ffde48

Please sign in to comment.