diff options
author | Venkatraman S <svenkatr@ti.com> | 2012-04-19 11:46:22 +0530 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-05-10 08:59:24 +0100 |
commit | fd0f8370c8a8400da5195e183ce1ef4f407cec21 (patch) | |
tree | 82f67083fae2c23cfd3af3766f95c779f8ee5044 /drivers/scsi/ufs | |
parent | f555e05265657476da5839cdb478e8220eb9965d (diff) |
[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>
Diffstat (limited to 'drivers/scsi/ufs')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 52b96e8bf92e..78be71cfc636 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 { |