dmaengine: pl330: fix residual for non-running BUSY descriptors
authorStephen Barber <smbarber@chromium.org>
Fri, 19 Aug 2016 00:59:59 +0000 (17:59 -0700)
committerVinod Koul <vinod.koul@intel.com>
Fri, 9 Sep 2016 11:49:09 +0000 (17:19 +0530)
commitd64e9a2c750930272492952c16f3f2c95311a6c9
tree4238e4f37611bff089e9254004698568527a35ca
parent29b4817d4018df78086157ea3a55c1d9424a7cfc
dmaengine: pl330: fix residual for non-running BUSY descriptors

Only one descriptor in the work list should be running at
any given time, but it's possible to have an enqueued BUSY
descriptor that has not yet transferred any data, or for
a BUSY descriptor to linger briefly before transitioning
to DONE. These cases should be handled to keep residual
calculations consistent even with the non-running BUSY
descriptors in the work list.

Signed-off-by: Stephen Barber <smbarber@chromium.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/pl330.c