提交 fd0f8370 编写于 作者: V Venkatraman S 提交者: James Bottomley

[SCSI] ufs: Fix evaluation of UTP task completion code

While interpreting the result of UTP task completion status,
by using boolean &&, the evaluation would fail when the
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED was received.

Either UPIU_TASK_MANAGEMENT_FUNC_COMPL or
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED should be
considered as a success result.
Reported-by: NJoe Perches <joe@perches.com>
Signed-off-by: NVenkatraman S <svenkatr@ti.com>
Reviewed-by: NNamjae Jeon <linkinjeon@gmail.com>
Acked-by: NSantosh Y <santoshsy@gmail.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 f555e052
......@@ -1160,7 +1160,7 @@ static int ufshcd_task_req_compl(struct ufs_hba *hba, u32 index)
task_result = be32_to_cpu(task_rsp_upiup->header.dword_1);
task_result = ((task_result & MASK_TASK_RESPONSE) >> 8);
if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL ||
if (task_result != UPIU_TASK_MANAGEMENT_FUNC_COMPL &&
task_result != UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED)
task_result = FAILED;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册