Commit fd0f8370 authored by Venkatraman S's avatar Venkatraman S Committed by 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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarVenkatraman S <svenkatr@ti.com>
Reviewed-by: default avatarNamjae Jeon <linkinjeon@gmail.com>
Acked-by: default avatarSantosh Y <santoshsy@gmail.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment