]> git.baikalelectronics.ru Git - kernel.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)
committerVinod Koul <vinod.koul@intel.com>
Thu, 10 Mar 2016 11:02:36 +0000 (16:32 +0530)
commit3e89a5c482af7cf102e20c7deeb5df06acc7d04e
treecc9425cd553b187bfee1495b89483fed5fd1910f
parent2f18e697484883a7630418081cd8c59761de4d95
dmaengine: at_xdmac: fix residue computation

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: ac70d1d8dc5d ("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>
drivers/dma/at_xdmac.c