Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dma: dma-axi-dmac: fix SW cyclic transfers

If 'hw_cyclic' is false we should still be able to do cyclic transfers in
"software". That was not working for the case where 'desc->num_sgs' is 1
because 'chan->next_desc' is never set with the current desc which means
that the cyclic transfer only runs once and in the next SOT interrupt we
do nothing since vchan_next_desc() will return NULL.

Fix it by setting 'chan->next_desc' as soon as we get a new desc via
vchan_next_desc().

Fixes: 0e3b67b348b8 ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller")
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
base-commit: 398035178503bf662281bbffb4bebce1460a4bc5
change-id: 20251104-axi-dmac-fixes-and-improvs-e3ad512a329c
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Link: https://patch.msgid.link/20251104-axi-dmac-fixes-and-improvs-v1-1-3e6fd9328f72@analog.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Nuno Sá and committed by
Vinod Koul
9bd25718 c3af0562

+1 -2
+1 -2
drivers/dma/dma-axi-dmac.c
··· 247 247 return; 248 248 list_move_tail(&vdesc->node, &chan->active_descs); 249 249 desc = to_axi_dmac_desc(vdesc); 250 + chan->next_desc = desc; 250 251 } 251 252 sg = &desc->sg[desc->num_submitted]; 252 253 ··· 266 265 else 267 266 chan->next_desc = NULL; 268 267 flags |= AXI_DMAC_FLAG_LAST; 269 - } else { 270 - chan->next_desc = desc; 271 268 } 272 269 273 270 sg->hw->id = axi_dmac_read(dmac, AXI_DMAC_REG_TRANSFER_ID);