]> git.baikalelectronics.ru Git - kernel.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)
committerVinod Koul <vinod.koul@intel.com>
Mon, 4 Apr 2016 16:41:43 +0000 (09:41 -0700)
commit6567d10617483a527f8abd08cdf4484052fbe105
tree15a03b790467c8d417e5bfe6714d686b0122d1c9
parent77a60a4bdd6f6300106a9e4db4dccc6b7efa2615
dmaengine: hsu: correct residue calculation of active descriptor

The commit a7dec22f4030 ("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: a7dec22f4030 ("dmaengine: hsu: speed up residue calculation")
Cc: stable@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/hsu/hsu.c