linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: at_xdmac: fix bug in prep_dma_cyclic
@ 2015-07-22 14:12 Ludovic Desroches
  2015-08-19 15:51 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Desroches @ 2015-07-22 14:12 UTC (permalink / raw)
  To: linux-arm-kernel

In cyclic mode, the round chaining has been broken by the introduction
of at_xdmac_queue_desc(): AT_XDMAC_MBR_UBC_NDE is set for all descriptors
excepted for the last one. at_xdmac_queue_desc() has to be called one
more time to chain the last and the first descriptors.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: 0d0ee751f7f7 ("dmaengine: xdmac: Rework the chaining logic")
---
 drivers/dma/at_xdmac.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index d51ef6d..df75db4 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -797,10 +797,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
 		list_add_tail(&desc->desc_node, &first->descs_list);
 	}
 
-	prev->lld.mbr_nda = first->tx_dma_desc.phys;
-	dev_dbg(chan2dev(chan),
-		"%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
-		__func__, prev, &prev->lld.mbr_nda);
+	at_xdmac_queue_desc(chan, prev, first);
 	first->tx_dma_desc.flags = flags;
 	first->xfer_size = buf_len;
 	first->direction = direction;
-- 
2.2.0

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

* [PATCH] dmaengine: at_xdmac: fix bug in prep_dma_cyclic
  2015-07-22 14:12 [PATCH] dmaengine: at_xdmac: fix bug in prep_dma_cyclic Ludovic Desroches
@ 2015-08-19 15:51 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2015-08-19 15:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jul 22, 2015 at 04:12:29PM +0200, Ludovic Desroches wrote:
> In cyclic mode, the round chaining has been broken by the introduction
> of at_xdmac_queue_desc(): AT_XDMAC_MBR_UBC_NDE is set for all descriptors
> excepted for the last one. at_xdmac_queue_desc() has to be called one
> more time to chain the last and the first descriptors.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2015-08-19 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 14:12 [PATCH] dmaengine: at_xdmac: fix bug in prep_dma_cyclic Ludovic Desroches
2015-08-19 15:51 ` 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).