]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dmaengine: xilinx: xilinx_dma: Fix unmasked residue subtraction
authorMarek Vasut <marex@nabladev.com>
Mon, 16 Mar 2026 22:25:24 +0000 (23:25 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 17 Mar 2026 10:44:34 +0000 (16:14 +0530)
commitc7d812e33f3e8ca0fa9eeabf71d1c7bc3acedc09
tree890451701b5abd32b83c3dc5f3688368d99e2c05
parentf61d145999d61948a23cd436ebbfa4c3b9ab8987
dmaengine: xilinx: xilinx_dma: Fix unmasked residue subtraction

The segment .control and .status fields both contain top bits which are
not part of the buffer size, the buffer size is located only in the bottom
max_buffer_len bits. To avoid interference from those top bits, mask out
the size using max_buffer_len first, and only then subtract the values.

Fixes: a575d0b4e663 ("dmaengine: xilinx_dma: Introduce xilinx_dma_get_residue")
Signed-off-by: Marek Vasut <marex@nabladev.com>
Link: https://patch.msgid.link/20260316222530.163815-1-marex@nabladev.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xilinx_dma.c