Patch "dmaengine: fsl-edma: fix eDMAv4 channel allocation issue" 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: fsl-edma: fix eDMAv4 channel allocation issue

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-fsl-edma-fix-edmav4-channel-allocation-iss.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 6717e02a99f5960946a34c2a499f8464b783c16d
Author: Frank Li <Frank.Li@xxxxxxx>
Date:   Tue Nov 14 10:48:21 2023 -0500

    dmaengine: fsl-edma: fix eDMAv4 channel allocation issue
    
    [ Upstream commit dc51b4442dd94ab12c146c1897bbdb40e16d5636 ]
    
    The eDMAv4 channel mux has a limitation where certain requests must use
    even channels, while others must use odd numbers.
    
    Add two flags (ARGS_EVEN_CH and ARGS_ODD_CH) to reflect this limitation.
    The device tree source (dts) files need to be updated accordingly.
    
    This issue was identified by the following commit:
    commit a725990557e7 ("arm64: dts: imx93: Fix the dmas entries order")
    
    Reverting channel orders triggered this problem.
    
    Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
    Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
    Link: https://lore.kernel.org/r/20231114154824.3617255-2-Frank.Li@xxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
index 238a69bd0d6f..75cae7ccae27 100644
--- a/drivers/dma/fsl-edma-main.c
+++ b/drivers/dma/fsl-edma-main.c
@@ -24,6 +24,8 @@
 #define ARGS_RX                         BIT(0)
 #define ARGS_REMOTE                     BIT(1)
 #define ARGS_MULTI_FIFO                 BIT(2)
+#define ARGS_EVEN_CH                    BIT(3)
+#define ARGS_ODD_CH                     BIT(4)
 
 static void fsl_edma_synchronize(struct dma_chan *chan)
 {
@@ -157,6 +159,12 @@ static struct dma_chan *fsl_edma3_xlate(struct of_phandle_args *dma_spec,
 		fsl_chan->is_remote = dma_spec->args[2] & ARGS_REMOTE;
 		fsl_chan->is_multi_fifo = dma_spec->args[2] & ARGS_MULTI_FIFO;
 
+		if ((dma_spec->args[2] & ARGS_EVEN_CH) && (i & 0x1))
+			continue;
+
+		if ((dma_spec->args[2] & ARGS_ODD_CH) && !(i & 0x1))
+			continue;
+
 		if (!b_chmux && i == dma_spec->args[0]) {
 			chan = dma_get_slave_channel(chan);
 			chan->device->privatecnt++;




[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