linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all
@ 2012-04-19 10:20 ciminaghi
  2012-04-23 12:42 ` Vinod Koul
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: ciminaghi @ 2012-04-19 10:20 UTC (permalink / raw)
  To: vinod.koul, linux-kernel
  Cc: dan.j.williams, pgeninatti, acolosimo, alarosa, Davide Ciminaghi

From: Davide Ciminaghi <ciminaghi@gnudd.com>

When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
to terminate and release the phy channel currently in use (if one is in use),
but the phychan_hold counter must also be reset (otherwise it could get
trapped in an unbalanced state).

Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
---
 drivers/dma/amba-pl08x.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index c301a8e..3d704ab 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1429,6 +1429,7 @@ static int pl08x_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
 			 * signal
 			 */
 			release_phy_channel(plchan);
+			plchan->phychan_hold = 0;
 		}
 		/* Dequeue jobs and free LLIs */
 		if (plchan->at) {
-- 
1.7.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all
  2012-04-19 10:20 [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all ciminaghi
@ 2012-04-23 12:42 ` Vinod Koul
  2012-04-24  4:06   ` Viresh Kumar
  2012-04-24 13:08 ` Linus Walleij
  2012-04-25  9:41 ` Vinod Koul
  2 siblings, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2012-04-23 12:42 UTC (permalink / raw)
  To: ciminaghi, Linus Walleij, Viresh Kumar
  Cc: linux-kernel, dan.j.williams, pgeninatti, acolosimo, alarosa

On Thu, 2012-04-19 at 12:20 +0200, ciminaghi@gnudd.com wrote:
> From: Davide Ciminaghi <ciminaghi@gnudd.com>
> 
> When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
> to terminate and release the phy channel currently in use (if one is in use),
> but the phychan_hold counter must also be reset (otherwise it could get
> trapped in an unbalanced state).
> 
> Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
> ---
>  drivers/dma/amba-pl08x.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index c301a8e..3d704ab 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1429,6 +1429,7 @@ static int pl08x_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
>  			 * signal
>  			 */
>  			release_phy_channel(plchan);
> +			plchan->phychan_hold = 0;
>  		}
>  		/* Dequeue jobs and free LLIs */
>  		if (plchan->at) {

Linus, Viresh... Any tested-by for this before I apply to fixes.

-- 
~Vinod


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all
  2012-04-23 12:42 ` Vinod Koul
@ 2012-04-24  4:06   ` Viresh Kumar
  0 siblings, 0 replies; 5+ messages in thread
From: Viresh Kumar @ 2012-04-24  4:06 UTC (permalink / raw)
  To: Vinod Koul
  Cc: ciminaghi, Linus Walleij, linux-kernel, dan.j.williams,
	pgeninatti, acolosimo, alarosa

On 4/23/2012 6:12 PM, Vinod Koul wrote:
> On Thu, 2012-04-19 at 12:20 +0200, ciminaghi@gnudd.com wrote:
>> > From: Davide Ciminaghi <ciminaghi@gnudd.com>
>> > 
>> > When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
>> > to terminate and release the phy channel currently in use (if one is in use),
>> > but the phychan_hold counter must also be reset (otherwise it could get
>> > trapped in an unbalanced state).
>> > 
>> > Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
>> > ---
>> >  drivers/dma/amba-pl08x.c |    1 +
>> >  1 files changed, 1 insertions(+), 0 deletions(-)
>> > 
>> > diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
>> > index c301a8e..3d704ab 100644
>> > --- a/drivers/dma/amba-pl08x.c
>> > +++ b/drivers/dma/amba-pl08x.c
>> > @@ -1429,6 +1429,7 @@ static int pl08x_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
>> >  			 * signal
>> >  			 */
>> >  			release_phy_channel(plchan);
>> > +			plchan->phychan_hold = 0;
>> >  		}
>> >  		/* Dequeue jobs and free LLIs */
>> >  		if (plchan->at) {
> Linus, Viresh... Any tested-by for this before I apply to fixes.

Looks good.

Reviewed-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all
  2012-04-19 10:20 [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all ciminaghi
  2012-04-23 12:42 ` Vinod Koul
@ 2012-04-24 13:08 ` Linus Walleij
  2012-04-25  9:41 ` Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2012-04-24 13:08 UTC (permalink / raw)
  To: ciminaghi
  Cc: vinod.koul, linux-kernel, dan.j.williams, pgeninatti, acolosimo, alarosa

On Thu, Apr 19, 2012 at 12:20 PM,  <ciminaghi@gnudd.com> wrote:

> From: Davide Ciminaghi <ciminaghi@gnudd.com>
>
> When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
> to terminate and release the phy channel currently in use (if one is in use),
> but the phychan_hold counter must also be reset (otherwise it could get
> trapped in an unbalanced state).
>
> Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>

Can't test it right now but looks convincingly correct:
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all
  2012-04-19 10:20 [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all ciminaghi
  2012-04-23 12:42 ` Vinod Koul
  2012-04-24 13:08 ` Linus Walleij
@ 2012-04-25  9:41 ` Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2012-04-25  9:41 UTC (permalink / raw)
  To: ciminaghi; +Cc: linux-kernel, dan.j.williams, pgeninatti, acolosimo, alarosa

On Thu, 2012-04-19 at 12:20 +0200, ciminaghi@gnudd.com wrote:
> From: Davide Ciminaghi <ciminaghi@gnudd.com>
> 
> When a client calls pl08x_control with DMA_TERMINATE_ALL, it is correct
> to terminate and release the phy channel currently in use (if one is in use),
> but the phychan_hold counter must also be reset (otherwise it could get
> trapped in an unbalanced state).
> 
> Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
Applied, Thanks
> ---
>  drivers/dma/amba-pl08x.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
> index c301a8e..3d704ab 100644
> --- a/drivers/dma/amba-pl08x.c
> +++ b/drivers/dma/amba-pl08x.c
> @@ -1429,6 +1429,7 @@ static int pl08x_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
>  			 * signal
>  			 */
>  			release_phy_channel(plchan);
> +			plchan->phychan_hold = 0;
>  		}
>  		/* Dequeue jobs and free LLIs */
>  		if (plchan->at) {


-- 
~Vinod


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-04-25  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 10:20 [PATCH] dmaengine/amba-pl08x : reset phychan_hold on terminate all ciminaghi
2012-04-23 12:42 ` Vinod Koul
2012-04-24  4:06   ` Viresh Kumar
2012-04-24 13:08 ` Linus Walleij
2012-04-25  9:41 ` Vinod Koul

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).