diff options
author | Sylvain ETIENNE <Sylvain.ETIENNE@ingenico.com> | 2015-12-02 11:10:16 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-12-05 03:46:23 -0500 |
commit | ef10b0b24143238c4457e0e60ec230b0fcc342a4 (patch) | |
tree | 4c614490777d901053318c7b3da8a5cbeb56e452 | |
parent | f5a00eb71902292c5a77d7cc27bdafd09ba3c112 (diff) |
dmaengine: at_xdmac: fix bad behavior in interleaved mode
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")
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/at_xdmac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index c344f89a77e8..bda49519b6de 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, | |||
965 | NULL, | 965 | NULL, |
966 | src_addr, dst_addr, | 966 | src_addr, dst_addr, |
967 | xt, xt->sgl); | 967 | xt, xt->sgl); |
968 | for (i = 0; i < xt->numf; i++) | 968 | |
969 | /* Length of the block is (BLEN+1) microblocks. */ | ||
970 | for (i = 0; i < xt->numf - 1; i++) | ||
969 | at_xdmac_increment_block_count(chan, first); | 971 | at_xdmac_increment_block_count(chan, first); |
970 | 972 | ||
971 | dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n", | 973 | dev_dbg(chan2dev(chan), "%s: add desc 0x%p to descs_list 0x%p\n", |