Skip to content

Commit

Permalink
dmaengine: dma-axi-dmac: Fix cyclic transfers descriptors length
Browse files Browse the repository at this point in the history
In a cyclic transfer num_periods * period_len = buf_len.
So for each period must be allocated a descriptor having length
equal with one period and not the whole transfer buffer.

Signed-off-by: Bogdan Togorean <[email protected]>
  • Loading branch information
btogorean authored and commodo committed Mar 8, 2019
1 parent 8b97db6 commit 6bf0dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/dma-axi-dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static struct dma_async_tx_descriptor *axi_dmac_prep_dma_cyclic(
return NULL;

axi_dmac_fill_linear_sg(chan, direction, buf_addr, num_periods,
buf_len, desc->sg);
period_len, desc->sg);

desc->cyclic = true;

Expand Down

0 comments on commit 6bf0dbc

Please sign in to comment.