diff options
author | John Garry <john.garry@huawei.com> | 2016-08-24 14:05:53 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-26 05:38:54 +0300 |
commit | 4ffde482213ed77ea8743d1fb3eccad6e14b151b (patch) | |
tree | fbb288785cfc7e34d292c3f0910ff87872c6a7bd /drivers/scsi/hisi_sas | |
parent | 9859f24e9a25fc774c4d960568f12bdd634e00ca (diff) | |
download | linux-4ffde482213ed77ea8743d1fb3eccad6e14b151b.tar.xz |
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>
Diffstat (limited to 'drivers/scsi/hisi_sas')
-rw-r--r-- | drivers/scsi/hisi_sas/hisi_sas_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 73f581f7dc36..85c73d311e4d 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -744,6 +744,12 @@ static int hisi_sas_exec_internal_tmf_task(struct domain_device *device, } 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 * underrun |