aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/at_xdmac.c
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2015-07-22 10:12:29 -0400
committerVinod Koul <vinod.koul@intel.com>2015-08-19 11:51:28 -0400
commite900c30dc1bb0cbc07708e9be1188f531632b2ef (patch)
tree2e4637c801f4e6a9051e57b9e06ef8133ed5cef2 /drivers/dma/at_xdmac.c
parentae9c02b421139c4c44340b019e250a9969a91613 (diff)
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: Ludovic Desroches <ludovic.desroches@atmel.com> Fixes: 0d0ee751f7f7 ("dmaengine: xdmac: Rework the chaining logic") Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/at_xdmac.c')
-rw-r--r--drivers/dma/at_xdmac.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 1a2d9a39ff25..99243f6a9c87 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -795,10 +795,7 @@ at_xdmac_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t buf_addr,
795 list_add_tail(&desc->desc_node, &first->descs_list); 795 list_add_tail(&desc->desc_node, &first->descs_list);
796 } 796 }
797 797
798 prev->lld.mbr_nda = first->tx_dma_desc.phys; 798 at_xdmac_queue_desc(chan, prev, first);
799 dev_dbg(chan2dev(chan),
800 "%s: chain lld: prev=0x%p, mbr_nda=%pad\n",
801 __func__, prev, &prev->lld.mbr_nda);
802 first->tx_dma_desc.flags = flags; 799 first->tx_dma_desc.flags = flags;
803 first->xfer_size = buf_len; 800 first->xfer_size = buf_len;
804 first->direction = direction; 801 first->direction = direction;