Commit e900c30d authored by Ludovic Desroches's avatar Ludovic Desroches Committed by Vinod Koul

dmaengine: at_xdmac: fix bug in prep_dma_cyclic

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: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
Fixes: 0d0ee751 ("dmaengine: xdmac: Rework the chaining logic")
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent ae9c02b4
...@@ -795,10 +795,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr, ...@@ -795,10 +795,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
list_add_tail(&desc->desc_node, &first->descs_list); list_add_tail(&desc->desc_node, &first->descs_list);
} }
prev->lld.mbr_nda = first->tx_dma_desc.phys; at_xdmac_queue_desc(chan, prev, first);
dev_dbg(chan2dev(chan),
"%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
__func__, prev, &prev->lld.mbr_nda);
first->tx_dma_desc.flags = flags; first->tx_dma_desc.flags = flags;
first->xfer_size = buf_len; first->xfer_size = buf_len;
first->direction = direction; first->direction = direction;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment