]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dmaengine: stm32-dma: Fix residue computation issue in cyclic mode
authorM'boumba Cedric Madianga <cedric.madianga@gmail.com>
Tue, 13 Dec 2016 13:40:48 +0000 (14:40 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 3 Jan 2017 03:53:17 +0000 (09:23 +0530)
commit2b12c5580e0a4c0ffd513d1522dd39b2464fb207
tree8ab19ceb150fc730169f485c105591e11a3e31e6
parent8d1b76f031ce60c50d03674e6d1db0c5e5f55945
dmaengine: stm32-dma: Fix residue computation issue in cyclic mode

This patch resolves the residue computation issue detected in cyclic mode.
Now, in cyclic mode, we increment next_sg variable as soon as a period is
transferred instead of after pushing a new sg request.
Then, we take into account that after transferring a complete buffer,
the next_sg variable is equal to 0.

Signed-off-by: M'boumba Cedric Madianga <cedric.madianga@gmail.com>
Reviewed-by: Ludovic BARRE <ludovic.barre@st.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/stm32-dma.c