Skip to content
Commit 6e7da747 authored by Achim Dahlhoff's avatar Achim Dahlhoff Committed by Vinod Koul
Browse files

dmaengine: sh: rcar-dmac: Fix glitch in dmaengine_tx_status



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: 73a47bd0 ("dmaengine: rcar-dmac: use TCRB instead of TCR for residue")
Signed-off-by: default avatarAchim Dahlhoff <Achim.Dahlhoff@de.bosch.com>
Signed-off-by: default avatarDirk Behme <dirk.behme@de.bosch.com>
Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: <stable@vger.kernel.org> # v4.16+
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 907bd68a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment