Patch "dmaengine: xilinx: xdma: Fix the count of elapsed periods in cyclic mode" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dmaengine: xilinx: xdma: Fix the count of elapsed periods in cyclic mode

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dmaengine-xilinx-xdma-fix-the-count-of-elapsed-perio.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e5cefb2a9c45fac38aab0e4c9d836c50dad62513
Author: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
Date:   Thu Nov 30 12:13:12 2023 +0100

    dmaengine: xilinx: xdma: Fix the count of elapsed periods in cyclic mode
    
    [ Upstream commit 26ee018ff6d1c326ac9b9be36513e35870ed09db ]
    
    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: cd8c732ce1a5 ("dmaengine: xilinx: xdma: Support cyclic transfers")
    Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231130111315.729430-2-miquel.raynal@xxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 84a88029226f..2c9c72d4b5a2 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -754,9 +754,9 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
 	if (ret)
 		goto out;
 
-	desc->completed_desc_num += complete_desc_num;
-
 	if (desc->cyclic) {
+		desc->completed_desc_num = complete_desc_num;
+
 		ret = regmap_read(xdev->rmap, xchan->base + XDMA_CHAN_STATUS,
 				  &st);
 		if (ret)
@@ -768,6 +768,8 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id)
 		goto out;
 	}
 
+	desc->completed_desc_num += complete_desc_num;
+
 	/*
 	 * if all data blocks are transferred, remove and complete the request
 	 */




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux