OSDN Git Service

dw_dmac: return proper residue value
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Jan 2013 09:48:03 +0000 (11:48 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 28 Jan 2013 12:04:50 +0000 (04:04 -0800)
commit4702d5244ca947263e8b7eb2ba6d8721e80c46e2
tree127c5fdd5590467d781aca04685517e97d02bb01
parent176dcec50f3f0bc46f11b983c1a3bbc2dd3514fd
dw_dmac: return proper residue value

Currently the driver returns full length of the active descriptor which is
wrong. We have to go throught the active descriptor and substract the length of
each sent children in the chain from the total length along with the actual
data in the DMA channel registers.

The cyclic case is not handled by this patch due to len field in the descriptor
structure is left untouched by the original code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dw_dmac.c
drivers/dma/dw_dmac_regs.h