diff mbox

dmaengine: pl330: dont complete descriptor for cyclic dma

Message ID 1337771851-3431-1-git-send-email-tushar.behera@linaro.org
State Accepted
Headers show

Commit Message

Tushar Behera May 23, 2012, 11:17 a.m. UTC
Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
cyclic dma") wrongly completes descriptor for cyclic dma, hence following
BUG_ON is still hit with cyclic DMA operations.

kernel BUG at drivers/dma/dmaengine.h:53!

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
 drivers/dma/pl330.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Tushar Behera May 24, 2012, 4:24 a.m. UTC | #1
Forgot to add driver author in the original mail, adding now.

On 05/23/2012 04:47 PM, Tushar Behera wrote:
> Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
> cyclic dma") wrongly completes descriptor for cyclic dma, hence following
> BUG_ON is still hit with cyclic DMA operations.
> 
> kernel BUG at drivers/dma/dmaengine.h:53!
> 
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
>  drivers/dma/pl330.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index fa3fb21..8c44f17 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2322,7 +2322,7 @@ static void pl330_tasklet(unsigned long data)
>  	/* Pick up ripe tomatoes */
>  	list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
>  		if (desc->status == DONE) {
> -			if (pch->cyclic)
> +			if (!pch->cyclic)
>  				dma_cookie_complete(&desc->txd);
>  			list_move_tail(&desc->node, &list);
>  		}
Jassi Brar May 24, 2012, 5:04 a.m. UTC | #2
On 24 May 2012 09:54, Tushar Behera <tushar.behera@linaro.org> wrote:
> Forgot to add driver author in the original mail, adding now.
>
> On 05/23/2012 04:47 PM, Tushar Behera wrote:
>> Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
>> cyclic dma") wrongly completes descriptor for cyclic dma, hence following
>> BUG_ON is still hit with cyclic DMA operations.
>>
>> kernel BUG at drivers/dma/dmaengine.h:53!
>>
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>>  drivers/dma/pl330.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
>> index fa3fb21..8c44f17 100644
>> --- a/drivers/dma/pl330.c
>> +++ b/drivers/dma/pl330.c
>> @@ -2322,7 +2322,7 @@ static void pl330_tasklet(unsigned long data)
>>       /* Pick up ripe tomatoes */
>>       list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
>>               if (desc->status == DONE) {
>> -                     if (pch->cyclic)
>> +                     if (!pch->cyclic)
>>                               dma_cookie_complete(&desc->txd);
>>                       list_move_tail(&desc->node, &list);
>>               }
>
Acked-by: Jassi Brar <jaswinder.singh@linaro.org>

Obviously a typo, but the commit eab2158 had a tested-by, so I hope
this doesn't break something else.
Vinod Koul May 25, 2012, 7:56 a.m. UTC | #3
On Thu, 2012-05-24 at 10:34 +0530, Jassi Brar wrote:
> On 24 May 2012 09:54, Tushar Behera <tushar.behera@linaro.org> wrote:
> > Forgot to add driver author in the original mail, adding now.
> >
> > On 05/23/2012 04:47 PM, Tushar Behera wrote:
> >> Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
> >> cyclic dma") wrongly completes descriptor for cyclic dma, hence following
> >> BUG_ON is still hit with cyclic DMA operations.
> >>
> >> kernel BUG at drivers/dma/dmaengine.h:53!
> >>
> >> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> >> ---
> >>  drivers/dma/pl330.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> >> index fa3fb21..8c44f17 100644
> >> --- a/drivers/dma/pl330.c
> >> +++ b/drivers/dma/pl330.c
> >> @@ -2322,7 +2322,7 @@ static void pl330_tasklet(unsigned long data)
> >>       /* Pick up ripe tomatoes */
> >>       list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
> >>               if (desc->status == DONE) {
> >> -                     if (pch->cyclic)
> >> +                     if (!pch->cyclic)
> >>                               dma_cookie_complete(&desc->txd);
> >>                       list_move_tail(&desc->node, &list);
> >>               }
> >
> Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
> 
> Obviously a typo, but the commit eab2158 had a tested-by, so I hope
> this doesn't break something else.
Precisely my worry as well. Thomas?

>From the code this looks as the right one.
thomas.abraham@linaro.org May 25, 2012, 8:31 a.m. UTC | #4
On 25 May 2012 13:26, Vinod Koul <vinod.koul@linux.intel.com> wrote:
> On Thu, 2012-05-24 at 10:34 +0530, Jassi Brar wrote:
>> On 24 May 2012 09:54, Tushar Behera <tushar.behera@linaro.org> wrote:
>> > Forgot to add driver author in the original mail, adding now.
>> >
>> > On 05/23/2012 04:47 PM, Tushar Behera wrote:
>> >> Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
>> >> cyclic dma") wrongly completes descriptor for cyclic dma, hence following
>> >> BUG_ON is still hit with cyclic DMA operations.
>> >>
>> >> kernel BUG at drivers/dma/dmaengine.h:53!
>> >>
>> >> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> >> ---
>> >>  drivers/dma/pl330.c |    2 +-
>> >>  1 files changed, 1 insertions(+), 1 deletions(-)
>> >>
>> >> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
>> >> index fa3fb21..8c44f17 100644
>> >> --- a/drivers/dma/pl330.c
>> >> +++ b/drivers/dma/pl330.c
>> >> @@ -2322,7 +2322,7 @@ static void pl330_tasklet(unsigned long data)
>> >>       /* Pick up ripe tomatoes */
>> >>       list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
>> >>               if (desc->status == DONE) {
>> >> -                     if (pch->cyclic)
>> >> +                     if (!pch->cyclic)
>> >>                               dma_cookie_complete(&desc->txd);
>> >>                       list_move_tail(&desc->node, &list);
>> >>               }
>> >
>> Acked-by: Jassi Brar <jaswinder.singh@linaro.org>
>>
>> Obviously a typo, but the commit eab2158 had a tested-by, so I hope
>> this doesn't break something else.
> Precisely my worry as well. Thomas?

I am not sure what I have missed here. Since it was a simple change, I
think I manually edited the code for the test. I apologize for the
mistake in the test.

Regards,
Thomas.

>
> >From the code this looks as the right one.
>
> --
> ~Vinod
>
Vinod Koul June 7, 2012, 8:13 a.m. UTC | #5
On Wed, 2012-05-23 at 16:47 +0530, Tushar Behera wrote:
> Commit eab215855803 ("dmaengine: pl330: dont complete descriptor for
> cyclic dma") wrongly completes descriptor for cyclic dma, hence following
> BUG_ON is still hit with cyclic DMA operations.
> 
> kernel BUG at drivers/dma/dmaengine.h:53!
> 
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
>  drivers/dma/pl330.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> index fa3fb21..8c44f17 100644
> --- a/drivers/dma/pl330.c
> +++ b/drivers/dma/pl330.c
> @@ -2322,7 +2322,7 @@ static void pl330_tasklet(unsigned long data)
>  	/* Pick up ripe tomatoes */
>  	list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
>  		if (desc->status == DONE) {
> -			if (pch->cyclic)
> +			if (!pch->cyclic)
>  				dma_cookie_complete(&desc->txd);
>  			list_move_tail(&desc->node, &list);
>  		}
Applied thanks. I have cc'ed stable.
diff mbox

Patch

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index fa3fb21..8c44f17 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2322,7 +2322,7 @@  static void pl330_tasklet(unsigned long data)
 	/* Pick up ripe tomatoes */
 	list_for_each_entry_safe(desc, _dt, &pch->work_list, node)
 		if (desc->status == DONE) {
-			if (pch->cyclic)
+			if (!pch->cyclic)
 				dma_cookie_complete(&desc->txd);
 			list_move_tail(&desc->node, &list);
 		}