summaryrefslogtreecommitdiff
path: root/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
diff options
context:
space:
mode:
authorXiaofei Tan <tanxiaofei@huawei.com>2018-03-07 20:25:11 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-03-12 21:55:25 -0400
commit6bf6db518cd10ad57e659607d0abece1b81956c6 (patch)
treeaae1b68bc60b86672a37989199dd8915c3c6eb99 /drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
parent36996a1e6dff4e5835faeb00ba920ccb9a07aa52 (diff)
scsi: hisi_sas: fix return value of hisi_sas_task_prep()
It is an implicit regulation that error code that function returned should be negative. But hisi_sas_task_prep() doesn't follow this. This may cause problems in the upper layer code. For example, in sas_expander.c of libsas, smp_execute_task_sg() may return the number of bytes of underrun. It will be conflicted with the scenaio lldd_execute_task() return an positive error code. This patch change the return value from SAS_PHY_DOWN to -ECOMM in hisi_sas_task_prep(). Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hisi_sas/hisi_sas_v3_hw.c')
0 files changed, 0 insertions, 0 deletions