Skip to content

Commit

Permalink
dmaengine: at_xdmac: fix bad behavior in interleaved mode
Browse files Browse the repository at this point in the history
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: 4e53857 ("dmaengine: at_xdmac: handle numf > 1")
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Sylvain ETIENNE authored and Vinod Koul committed Dec 5, 2015
1 parent f5a00eb commit ef10b0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ef10b0b

Please sign in to comment.