From 86d6597077feb85375eff8ab5fa1004153519e8d Mon Sep 17 00:00:00 2001 From: Venkatraman S Date: Thu, 3 May 2012 15:43:26 +1000 Subject: [PATCH] drivers/scsi/ufs: fix evaluation of task_failed status Else FAILED would be set even if task_result was originally equal to UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED. Reported-by: Joe Perches Signed-off-by: Venkatraman S Reviewed-by: Namjae Jeon Acked-by: Santosh Y Cc: James Bottomley Signed-off-by: Andrew Morton --- drivers/scsi/ufs/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index b9f85b587a5b..5ab9b3fb1854 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -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 { -- 2.39.5