* [PATCH RESEND 2/2] scsi/ufs: Fix evaluation of task_failed status
@ 2012-04-18 7:38 Venkatraman S
2012-04-18 22:56 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Venkatraman S @ 2012-04-18 7:38 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, santoshsy, linkinjeon, Venkatraman S
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: Andrew Morton <akpm@linux-foundation.org>
---
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 aa97200..cd59f6f 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 {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND 2/2] scsi/ufs: Fix evaluation of task_failed status
2012-04-18 7:38 [PATCH RESEND 2/2] scsi/ufs: Fix evaluation of task_failed status Venkatraman S
@ 2012-04-18 22:56 ` Andrew Morton
2012-04-19 6:09 ` S, Venkatraman
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2012-04-18 22:56 UTC (permalink / raw)
To: Venkatraman S
Cc: linux-kernel, santoshsy, linkinjeon, James Bottomley, linux-scsi
Please cc James and linux-scsi on drivers/scsi patches?
On Wed, 18 Apr 2012 13:08:53 +0530
Venkatraman S <svenkatr@ti.com> wrote:
> Else FAILED would be set even if task_result was
> originally equal to UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED.
This changelog is inadequate. It failed to describe the end-user
impact of the bug. Without this information we cannot decide which
kernel version(s) should be patched. Please always fully describe a
bug when fixing it.
> --- 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 {
And the title of the patch is poor. There is no "task_failed" here.
Something like "fix evaluation of task completion code" would be
better?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND 2/2] scsi/ufs: Fix evaluation of task_failed status
2012-04-18 22:56 ` Andrew Morton
@ 2012-04-19 6:09 ` S, Venkatraman
0 siblings, 0 replies; 3+ messages in thread
From: S, Venkatraman @ 2012-04-19 6:09 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, santoshsy, linkinjeon, James Bottomley, linux-scsi
On Thu, Apr 19, 2012 at 4:26 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> Please cc James and linux-scsi on drivers/scsi patches?
>
> On Wed, 18 Apr 2012 13:08:53 +0530
> Venkatraman S <svenkatr@ti.com> wrote:
>
>> Else FAILED would be set even if task_result was
>> originally equal to UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED.
>
> This changelog is inadequate. It failed to describe the end-user
> impact of the bug. Without this information we cannot decide which
> kernel version(s) should be patched. Please always fully describe a
> bug when fixing it.
>
>> --- 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 {
>
> And the title of the patch is poor. There is no "task_failed" here.
> Something like "fix evaluation of task completion code" would be
> better?
Ok. I will send an updated version of the patch.
Regards,
Venkat.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-19 6:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-18 7:38 [PATCH RESEND 2/2] scsi/ufs: Fix evaluation of task_failed status Venkatraman S
2012-04-18 22:56 ` Andrew Morton
2012-04-19 6:09 ` S, Venkatraman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).