]> git.baikalelectronics.ru Git - kernel.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)
commit1dc4875d994a4764de78404315d0dab4d6e8bcf0
tree8ab19ceb150fc730169f485c105591e11a3e31e6
parent89984542985d37990f92c3de5e8d0c5b61f37f15
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