mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 11:13:58 +08:00
[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: Joe Perches <joe@perches.com> Signed-off-by: Venkatraman S <svenkatr@ti.com> Reviewed-by: Namjae Jeon <linkinjeon@gmail.com> Acked-by: Santosh Y <santoshsy@gmail.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
f555e05265
commit
fd0f8370c8
@ -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 = be32_to_cpu(task_rsp_upiup->header.dword_1);
|
||||||
task_result = ((task_result & MASK_TASK_RESPONSE) >> 8);
|
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 != UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED)
|
||||||
task_result = FAILED;
|
task_result = FAILED;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user