summaryrefslogtreecommitdiff
path: root/include/asm-arm/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorMarek Vasut <marex@nabladev.com>2026-03-16 23:18:57 +0100
committerVinod Koul <vkoul@kernel.org>2026-03-17 16:14:20 +0530
commitf61d145999d61948a23cd436ebbfa4c3b9ab8987 (patch)
treea3c8105423beb145624501a2b5fd115c05a80ae4 /include/asm-arm/git@git.tavy.me:linux.git
parente9cc95397bb7da13fe8a5b53a2f23cfaf9018ade (diff)
dmaengine: xilinx: xilinx_dma: Fix residue calculation for cyclic DMA
The cyclic DMA calculation is currently entirely broken and reports residue only for the first segment. The problem is twofold. First, when the first descriptor finishes, it is moved from active_list to done_list, but it is never returned back into the active_list. The xilinx_dma_tx_status() expects the descriptor to be in the active_list to report any meaningful residue information, which never happens after the first descriptor finishes. Fix this up in xilinx_dma_start_transfer() and if the descriptor is cyclic, lift it from done_list and place it back into active_list list. Second, the segment .status fields of the descriptor remain dirty. Once the DMA did one pass on the descriptor, the .status fields are populated with data by the DMA, but the .status fields are not cleared before reuse during the next cyclic DMA round. The xilinx_dma_get_residue() recognizes that as if the descriptor was complete and had 0 residue, which is bogus. Reinitialize the status field before placing the descriptor back into the active_list. Fixes: c0bba3a99f07 ("dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine") Signed-off-by: Marek Vasut <marex@nabladev.com> Link: https://patch.msgid.link/20260316221943.160375-1-marex@nabladev.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/asm-arm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions