]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/scsi/ufs: fix evaluation of task_failed status
authorVenkatraman S <svenkatr@ti.com>
Thu, 3 May 2012 05:43:26 +0000 (15:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 3 May 2012 05:46:19 +0000 (15:46 +1000)
Else FAILED would be set even if task_result was originally equal to
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED.

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>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/scsi/ufs/ufshcd.c

index b9f85b587a5ba2f9f44bf1010f6faf08830745ad..5ab9b3fb1854004c7018bc72e1d461369da98864 100644 (file)
@@ -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 {