DMA Engine development
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Lizhi Hou <lizhi.hou@amd.com>, Brian Xu <brian.xu@amd.com>,
	 Raj Kumar Rampelli <raj.kumar.rampelli@amd.com>,
	 Vinod Koul <vkoul@kernel.org>,
	Michal Simek <michal.simek@amd.com>,
	 Jan Kuliga <jankul@alatek.krakow.pl>,
	 Miquel Raynal <miquel.raynal@bootlin.com>
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	 Louis Chauvet <louis.chauvet@bootlin.com>
Subject: [PATCH 1/3] dmaengine: xilinx: xdma: Fix wrong offsets in the buffers addresses in dma descriptor
Date: Wed, 27 Mar 2024 10:58:48 +0100	[thread overview]
Message-ID: <20240327-digigram-xdma-fixes-v1-1-45f4a52c0283@bootlin.com> (raw)
In-Reply-To: <20240327-digigram-xdma-fixes-v1-0-45f4a52c0283@bootlin.com>

From: Miquel Raynal <miquel.raynal@bootlin.com>

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>
---
 drivers/dma/xilinx/xdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);

-- 
2.43.0


  reply	other threads:[~2024-03-27  9:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  9:58 [PATCH 0/3] dmaengine: xilinx: xdma: Various fixes for xdma Louis Chauvet
2024-03-27  9:58 ` Louis Chauvet [this message]
2024-03-27  9:58 ` [PATCH 2/3] dmaengine: xilinx: xdma: Fix synchronization issue Louis Chauvet
2024-03-27 17:46   ` Lizhi Hou
2024-03-28  0:23     ` Miquel Raynal
2024-03-28 16:49       ` Lizhi Hou
2024-03-28  1:09   ` kernel test robot
2024-03-27  9:58 ` [PATCH 3/3] dmaengine: xilinx: xdma: Clarify kdoc in XDMA driver Louis Chauvet
2024-04-07 16:38 ` [PATCH 0/3] dmaengine: xilinx: xdma: Various fixes for xdma Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240327-digigram-xdma-fixes-v1-1-45f4a52c0283@bootlin.com \
    --to=louis.chauvet@bootlin.com \
    --cc=brian.xu@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jankul@alatek.krakow.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=michal.simek@amd.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=raj.kumar.rampelli@amd.com \
    --cc=stable@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox