[ 3.5.y.z extended stable ] Patch "dmaengine: ste_dma40: fix pm runtime ref counting" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed Jun 12 13:15:27 UTC 2013


This is a note to let you know that I have just added a patch titled

    dmaengine: ste_dma40: fix pm runtime ref counting

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From 6e096674125227a76f1dc4db80137f84e2594a8b Mon Sep 17 00:00:00 2001
From: Rabin Vincent <rabin.vincent at stericsson.com>
Date: Mon, 27 May 2013 16:03:40 +0200
Subject: [PATCH] dmaengine: ste_dma40: fix pm runtime ref counting

commit 9ecb41bd8cf002fd8f3e063db4df81647ddd623c upstream.

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 at stericsson.com>
Acked-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Vinod Koul <vinod.koul at intel.com>
[ luis: backport to 3.5: adjust context ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/dma/ste_dma40.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 000d309..aec952f 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1393,10 +1393,13 @@ 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);
+		}
+
 	}

 	d40c->pending_tx++;
--
1.8.1.2





More information about the kernel-team mailing list