Skip to content

Commit 26ee018

Browse files
miquelraynalvinodkoul
authored andcommitted
dmaengine: xilinx: xdma: Fix the count of elapsed periods in cyclic mode
Xilinx DMA engine is capable of keeping track of the number of elapsed periods and this is an increasing 32-bit counter which is only reset when turning off the engine. No need to add this value to our local counter. Fixes: cd8c732 ("dmaengine: xilinx: xdma: Support cyclic transfers") Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent e271c0b commit 26ee018

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/dma/xilinx/xdma.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,9 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
754754
if (ret)
755755
goto out;
756756

757-
desc->completed_desc_num += complete_desc_num;
758-
759757
if (desc->cyclic) {
758+
desc->completed_desc_num = complete_desc_num;
759+
760760
ret = regmap_read(xdev->rmap, xchan->base + XDMA_CHAN_STATUS,
761761
&st);
762762
if (ret)
@@ -768,6 +768,8 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
768768
goto out;
769769
}
770770

771+
desc->completed_desc_num += complete_desc_num;
772+
771773
/*
772774
* if all data blocks are transferred, remove and complete the request
773775
*/

0 commit comments

Comments
 (0)