summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2024-03-27 10:58:48 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-05-02 16:35:28 +0200
commitf70e6b9e4bf5caea49f9ea94d7c40814b1b0da17 (patch)
tree8870f994453ec30ec06089bc3f98c1ea1b12f34e
parent1b27647591cc4e6af0b3674979c47637c586b579 (diff)
downloadlinux-stable-f70e6b9e4bf5caea49f9ea94d7c40814b1b0da17.tar.gz
linux-stable-f70e6b9e4bf5caea49f9ea94d7c40814b1b0da17.tar.bz2
linux-stable-f70e6b9e4bf5caea49f9ea94d7c40814b1b0da17.zip
dmaengine: xilinx: xdma: Fix wrong offsets in the buffers addresses in dma descriptor
commit 5b9706bfc094314c600ab810a61208a7cbaa4cb3 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/dma/xilinx/xdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 170017ff2aad..b9788aa8f6b7 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -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);