]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/scsi/ufs: fix evaluation of task_failed status
authorVenkatraman S <svenkatr@ti.com>
Wed, 25 Apr 2012 01:03:25 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:16 +0000 (15:17 +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 {