dmaengine: xilinx: xdma: Fix wrong offsets in the buffers addresses in dma descriptor
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 27 Mar 2024 09:58:48 +0000 (10:58 +0100)
committerVinod Koul <vkoul@kernel.org>
Sun, 7 Apr 2024 11:38:45 +0000 (17:08 +0530)
The addition of interleaved transfers slightly changed the way
addresses inside DMA descriptors are derived, breaking cyclic
transfers.

Fixes: 3e184e64c2e5 ("dmaengine: xilinx: xdma: Prepare the introduction of interleaved DMA transfers")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://lore.kernel.org/r/20240327-digigram-xdma-fixes-v1-1-45f4a52c0283@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xdma.c

index 170017ff2aad6e58c8d0ee4ea6e7d42c15c8202c..b9788aa8f6b7b599c6978bce6f58769a7c3f324f 100644 (file)
@@ -704,7 +704,7 @@ xdma_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t address,
        desc_num = 0;
        for (i = 0; i < periods; i++) {
                desc_num += xdma_fill_descs(sw_desc, *src, *dst, period_size, desc_num);
-               addr += i * period_size;
+               addr += period_size;
        }
 
        tx_desc = vchan_tx_prep(&xdma_chan->vchan, &sw_desc->vdesc, flags);