]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: at_xdmac: fix residue computation
authorLudovic Desroches <ludovic.desroches@atmel.com>
Thu, 10 Mar 2016 09:17:55 +0000 (10:17 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 22 Mar 2016 15:10:35 +0000 (11:10 -0400)
commitc7d4bd1d975e3fa1dd4ecf557ada0e792d551a6c
tree6e2fed0a95e3ee4a6dfaed2f0ac13eba778d215f
parenteac525506a083a389ba173880979a6291401af2d
dmaengine: at_xdmac: fix residue computation

[ Upstream commit 25c5e9626ca4d40928dc9c44f009ce2ed0a739e7 ]

When computing the residue we need two pieces of information: the current
descriptor and the remaining data of the current descriptor. To get
that information, we need to read consecutively two registers but we
can't do it in an atomic way. For that reason, we have to check manually
that current descriptor has not changed.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Suggested-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Reported-by: David Engraf <david.engraf@sysgo.com>
Tested-by: David Engraf <david.engraf@sysgo.com>
Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel
eXtended DMA Controller driver")
Cc: stable@vger.kernel.org #4.1 and later
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/dma/at_xdmac.c