Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281965 > unrolled thread

[PATCH] dmaengine: at_xdmac: fix bad behavior in interleaved mode

Started byLudovic Desroches <ludovic.desroches@atmel.com>
First post2015-12-02 17:20 +0100
Last post2015-12-05 09:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] dmaengine: at_xdmac: fix bad behavior in interleaved mode Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-12-02 17:20 +0100
    Re: [PATCH] dmaengine: at_xdmac: fix bad behavior in interleaved mode Vinod Koul <vinod.koul@intel.com> - 2015-12-05 09:50 +0100

#1281965 — [PATCH] dmaengine: at_xdmac: fix bad behavior in interleaved mode

FromLudovic Desroches <ludovic.desroches@atmel.com>
Date2015-12-02 17:20 +0100
Subject[PATCH] dmaengine: at_xdmac: fix bad behavior in interleaved mode
Message-ID<qBiio-161-35@gated-at.bofh.it>
From: Sylvain ETIENNE <Sylvain.ETIENNE@ingenico.com>

When performing interleaved transfers with numf > 1, an extra line is
copied. The mbr.bc field is incremented once too often. The length of
the block is (BLEN+1) microblocks.

Signed-off-by: Sylvain ETIENNE <Sylvain.ETIENNE@ingenico.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: 4e5385784e69 ("dmaengine: at_xdmac: handle numf > 1")
---
 drivers/dma/at_xdmac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 7f039de..c8faaa5 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -965,7 +965,9 @@ at_xdmac_prep_interleaved(struct dma_chan *chan,
 							NULL,
 							src_addr, dst_addr,
 							xt, xt->sgl);
-		for (i = 0; i < xt->numf; i++)
+
+		/* Length of the block is (BLEN+1) microblocks. */
+		for (i = 0; i < xt->numf - 1; i++)
 			at_xdmac_increment_block_count(chan, first);
 
 		dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n",
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1284496

FromVinod Koul <vinod.koul@intel.com>
Date2015-12-05 09:50 +0100
Message-ID<qCgHw-78L-3@gated-at.bofh.it>
In reply to#1281965
On Wed, Dec 02, 2015 at 05:10:16PM +0100, Ludovic Desroches wrote:
> From: Sylvain ETIENNE <Sylvain.ETIENNE@ingenico.com>
> 
> When performing interleaved transfers with numf > 1, an extra line is
> copied. The mbr.bc field is incremented once too often. The length of
> the block is (BLEN+1) microblocks.

Applied, thanks

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web