public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ste_dma40: fix pm runtime ref counting
@ 2013-05-27 14:03 Rabin Vincent
  2013-05-27 14:05 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Rabin Vincent @ 2013-05-27 14:03 UTC (permalink / raw)
  To: vinod.koul, djbw; +Cc: linus.walleij, rabin, linux-kernel, Rabin Vincent

The pm runtime reference counting of the driver is broken for the case
when there is more than one transfer queued, leading to the device being
runtime suspend while active.  Fix it.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
---
 drivers/dma/ste_dma40.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 1734fee..71bf4ec 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1566,10 +1566,12 @@ static void dma_tc_handle(struct d40_chan *d40c)
 			return;
 		}
 
-		if (d40_queue_start(d40c) == NULL)
+		if (d40_queue_start(d40c) == NULL) {
 			d40c->busy = false;
-		pm_runtime_mark_last_busy(d40c->base->dev);
-		pm_runtime_put_autosuspend(d40c->base->dev);
+
+			pm_runtime_mark_last_busy(d40c->base->dev);
+			pm_runtime_put_autosuspend(d40c->base->dev);
+		}
 
 		d40_desc_remove(d40d);
 		d40_desc_done(d40c, d40d);
-- 
1.8.1.5


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

* Re: [PATCH] dmaengine: ste_dma40: fix pm runtime ref counting
  2013-05-27 14:03 [PATCH] dmaengine: ste_dma40: fix pm runtime ref counting Rabin Vincent
@ 2013-05-27 14:05 ` Linus Walleij
  2013-05-27 14:25   ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2013-05-27 14:05 UTC (permalink / raw)
  To: Rabin Vincent
  Cc: Vinod Koul, Dan Williams, Rabin Vincent,
	linux-kernel@vger.kernel.org

On Mon, May 27, 2013 at 4:03 PM, Rabin Vincent
<rabin.vincent@stericsson.com> wrote:

> The pm runtime reference counting of the driver is broken for the case
> when there is more than one transfer queued, leading to the device being
> runtime suspend while active.  Fix it.
>
> Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>

Looks good to me.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Vinod, are you taking this for fixes?

Yours,
Linus Walleij

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

* Re: [PATCH] dmaengine: ste_dma40: fix pm runtime ref counting
  2013-05-27 14:05 ` Linus Walleij
@ 2013-05-27 14:25   ` Vinod Koul
  0 siblings, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2013-05-27 14:25 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Rabin Vincent, Dan Williams, Rabin Vincent,
	linux-kernel@vger.kernel.org

On Mon, May 27, 2013 at 04:05:57PM +0200, Linus Walleij wrote:
> On Mon, May 27, 2013 at 4:03 PM, Rabin Vincent
> <rabin.vincent@stericsson.com> wrote:
> 
> > The pm runtime reference counting of the driver is broken for the case
> > when there is more than one transfer queued, leading to the device being
> > runtime suspend while active.  Fix it.
> >
> > Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
> 
> Looks good to me.
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Vinod, are you taking this for fixes?
Sure, applied to fixes. CCed stable as well

--
~Vinod

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

end of thread, other threads:[~2013-05-27 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-27 14:03 [PATCH] dmaengine: ste_dma40: fix pm runtime ref counting Rabin Vincent
2013-05-27 14:05 ` Linus Walleij
2013-05-27 14:25   ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox