scsi: hisi_sas: modify return value of hisi_sas_query_task()
authorXiang Chen <chenxiang66@hisilicon.com>
Mon, 7 Nov 2016 12:48:35 +0000 (20:48 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Nov 2016 14:54:40 +0000 (09:54 -0500)
sas_scsi_find_task() only deals with return value
TMF_RESP_FUNC_FAILED/TMF_RESP_FUNC_SUCC/TMF_RESP_FUNC_COMPLETE of
query task. So for LLDD errors just return TMF_RESP_FUNC_FAILED.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c

index 9133238810eecc370c4294ec48e1b717f71fb182..504cbcff45a694afba7bcf3b785ee6dbdd909e5c 100644 (file)
@@ -961,6 +961,9 @@ static int hisi_sas_query_task(struct sas_task *task)
                case TMF_RESP_FUNC_FAILED:
                case TMF_RESP_FUNC_COMPLETE:
                        break;
+               default:
+                       rc = TMF_RESP_FUNC_FAILED;
+                       break;
                }
        }
        return rc;