]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: hsu: correct residue calculation of active descriptor
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 18 Mar 2016 12:26:33 +0000 (14:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 May 2016 21:49:00 +0000 (14:49 -0700)
commit390cb9a6064eed7b197e926137293ffbfb2eb3d8
treef4527f437074fd1e491fc061be79ff38854a9caa
parentbff35bc72156c845f29a549c12fbec7a3618c739
dmaengine: hsu: correct residue calculation of active descriptor

commit a197f3c7d48c0c1f45076ea47533a76ba9b1a959 upstream.

The commit f0579c8ceaf1 ("dmaengine: hsu: speed up residue calculation")
speeded up calculation of the queued descriptor but broke the initial residue
value for active descriptor.

In accordance with documentation the hardware descriptor is updated each time
DMA transfered some bytes. It means we have to calculate a sum of lengths of
non-submitted hardware descriptors and whatever current values in the hardware.
Do this straightforward.

Fixes: f0579c8ceaf1 ("dmaengine: hsu: speed up residue calculation")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/hsu/hsu.c