mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
scsi: hisi_sas: add TMF success check
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 <john.garry@huawei.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
9859f24e9a
commit
4ffde48221
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue