dmaengine: rcar-dmac: Fix residue reporting for pending descriptors

Cookies corresponding to pending transfers have a residue value equal to
the full size of the corresponding descriptor. The driver miscomputes
that and uses the size of the active descriptor instead. Fix it.

Reported-by: Geert Uytterhoeven <>
Signed-off-by: Laurent Pinchart <>
[geert: Also check list]
Signed-off-by: Geert Uytterhoeven <>
Signed-off-by: Niklas Söderlund <>
Signed-off-by: Vinod Koul <>
(cherry picked from commit 55bd582b4d8c2266bc43cbae2ddfce31b489618f)
Signed-off-by: Fabrizio Castro <>
Reviewed-by: Biju Das <>
Signed-off-by: Ben Hutchings <>
1 file changed