path: root/drivers/dma/dmaengine.c
diff options
authorYuri Tikhonov <>2009-01-12 15:17:20 -0700
committerDan Williams <>2009-01-12 15:19:29 -0700
commitdd59b8537f6cb53ab863fafad86a5828f1e889a2 (patch)
treea1236a8042583813fc7b9e32688b9bc6e7858ea0 /drivers/dma/dmaengine.c
parentc59765042f53a79a7a65585042ff463b69cb248c (diff)
dmaengine: fix dependency chaining
In dmaengine we track the dependencies between the descriptors using the 'next' pointers of the structure. These pointers are set to NULL as soon as the corresponding descriptor has been submitted to the channel (in dma_run_dependencies()). But, the first 'next' in chain is still remaining set, regardless the fact, that tx->next has been already submitted. This may lead to multiple submissions of the same descriptor. This patch fixes this. Actually, some previous implementation of the xxx_run_dependencies() function already had this fix in place. The fdb..0eaf3 commit, beside the correct things, broke this. Cc: <> Signed-off-by: Yuri Tikhonov <> Signed-off-by: Dan Williams <>
Diffstat (limited to 'drivers/dma/dmaengine.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 403dbe781122..6df144a65fef 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -961,6 +961,8 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx)
if (!dep)
+ /* we'll submit tx->next now, so clear the link */
+ tx->next = NULL;
chan = dep->chan;
/* keep submitting up until a channel switch is detected