]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dmaengine: at_xdmac: fix bug in prep_dma_cyclic
authorLudovic Desroches <ludovic.desroches@atmel.com>
Wed, 22 Jul 2015 14:12:29 +0000 (16:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Oct 2015 21:49:17 +0000 (14:49 -0700)
commit e900c30dc1bb0cbc07708e9be1188f531632b2ef upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/at_xdmac.c

index af371b28e98f538bbe6646d1bfe6a4e26a1ef896..da7917a2eed20391bc667d902cebee1dc75fdc88 100644 (file)
@@ -806,10 +806,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;