Hi Dirk-san,
From: Dirk Behme, Sent: Friday, April 12, 2019 2:29 PM
From: Achim Dahlhoff Achim.Dahlhoff@de.bosch.com
The tx_status poll in the rcar_dmac driver reads the status register which indicates which chunk is busy (DMACHCRB). Afterwards the point inside the chunk is read from DMATCRB. It is possible that the chunk has changed between the two reads. The result is a non-monotonous increase of the residue. Fix this by introducing a 'safe read' logic.
Fixes: 73a47bd0da66 ("dmaengine: rcar-dmac: use TCRB instead of TCR for residue")
I guess this driver has this issue potencially from previous of the commit (maybe commit ccadee9b1e9 ("dmaengine: rcar-dmac: Implement support for hardware descriptor lists"?).
But, this patch seems good to fix the issue. So,
Reviewed-by: Yoshihiro Shimoda yoshihiro.shimoda.uh@renesas.com
Best regards, Yoshihiro Shimoda