dmaengine: at_xdmac: fix residue corruption
authorLudovic Desroches <ludovic.desroches@atmel.com>
Thu, 12 May 2016 14:54:09 +0000 (16:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Aug 2016 09:49:24 +0000 (11:49 +0200)
commit5ce7333f41a81e82d54537e5057224a3cdc78342
tree3e5769bda0a585e86d1b1b04fa34fa569b70144e
parent1b60fcdcf9bc09d3f86084b17d75c050cfed13a8
dmaengine: at_xdmac: fix residue corruption

commit 53398f488821c2b5b15291e3debec6ad33f75d3d upstream.

An unexpected value of CUBC can lead to a corrupted residue. A more
complex sequence is needed to detect an inaccurate value for NCA or CUBC.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel
eXtended DMA Controller driver")
Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/at_xdmac.c