]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
dmaengine: xilinx_dma: Set dma_device directions
authorThomas Gessler <thomas.gessler@brueckmann-gmbh.de>
Wed, 7 May 2025 18:21:01 +0000 (20:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2025 13:57:32 +0000 (15:57 +0200)
[ Upstream commit 7e01511443c30a55a5ae78d3debd46d4d872517e ]

Coalesce the direction bits from the enabled TX and/or RX channels into
the directions bit mask of dma_device. Without this mask set,
dma_get_slave_caps() in the DMAEngine fails, which prevents the driver
from being used with an IIO DMAEngine buffer.

Signed-off-by: Thomas Gessler <thomas.gessler@brueckmann-gmbh.de>
Reviewed-by: Suraj Gupta <suraj.gupta2@amd.com>
Tested-by: Folker Schwesinger <dev@folker-schwesinger.de>
Link: https://lore.kernel.org/r/20250507182101.909010-1-thomas.gessler@brueckmann-gmbh.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/xilinx/xilinx_dma.c

index edc2bb8f0523ce8c03036c93b86029c4b13009ee..48ac51447baeea095ca5475f16b88393814675db 100644 (file)
@@ -2861,6 +2861,8 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
                return -EINVAL;
        }
 
+       xdev->common.directions |= chan->direction;
+
        /* Request the interrupt */
        chan->irq = irq_of_parse_and_map(node, chan->tdest);
        err = request_irq(chan->irq, xdev->dma_config->irq_handler,