linux/drivers/dma/xilinx
Alex Bereza 7ed1e3070c dmaengine: xilinx_dma: Fix hardware buffer descriptor chain after cyclic DMA
Using the DMA in cyclic mode modifies the hardware buffer descriptor
chain in xilinx_dma_prep_dma_cyclic so that the last descriptor used by
the cyclic transfer points back to the first descriptor, but it never
restores the original descriptor ring. This breaks using non-cyclic mode
after cyclic mode with an error like:

  xilinx-vdma 86000000.dma: Channel 00000000354d5c8d has errors 100, cdr 6de40000 tdr 6de40400

The only way to get out of this error state is to rebuild the hardware
buffer descriptor ring by releasing and re-acquiring the channel.

Fix using non-cyclic mode after cyclic mode by always restoring the
original buffer descriptor ring in the same manner as it is set up by
xilinx_dma_alloc_chan_resources().

Fixes: 23059408b6 ("dmaengine: xilinx_dma: Fix race condition in the driver for multiple descriptor scenario")
Signed-off-by: Alex Bereza <alex@bereza.email>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Suraj Gupta <suraj.gupta2@amd.com>
Link: https://patch.msgid.link/20260817-fix-hw-buf-desc-after-cyclic-mode-v1-1-1fe47e701d6c@bereza.email
Link: https://patch.msgid.link/20260818-fix-hw-buf-desc-after-cyclic-mode-v2-1-530ff44c6a81@bereza.email
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2026-09-10 18:18:41 +05:30
..
Makefile dmaengine: xilinx: xdma: Add xilinx xdma driver 2023-02-10 11:32:26 +05:30
xdma-regs.h dmaengine: xilinx: xdma: Fix regmap max_register 2025-12-14 14:47:23 +05:30
xdma.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
xilinx_dma.c dmaengine: xilinx_dma: Fix hardware buffer descriptor chain after cyclic DMA 2026-09-10 18:18:41 +05:30
xilinx_dpdma.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
zynqmp_dma.c dmaengine: zynqmp_dma: fix kernel doc for zynqmp_dma_remove() 2026-07-02 21:11:50 +05:30