lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <D8EI6SI5EIUY.2JD240P96ZZSS@folker-schwesinger.de>
Date: Wed, 12 Mar 2025 19:23:49 +0100
From: "Folker Schwesinger" <dev@...ker-schwesinger.de>
To: "Vinod Koul" <vkoul@...nel.org>, "Michal Simek" <michal.simek@....com>,
 "Jernej Skrabec" <jernej.skrabec@...il.com>, "Manivannan Sadhasivam"
 <manivannan.sadhasivam@...aro.org>, "Krzysztof Kozlowski"
 <krzysztof.kozlowski@...aro.org>, Uwe Kleine-König
 <u.kleine-koenig@...libre.com>, "Marek Vasut" <marex@...x.de>
Cc: "Kedareswara rao Appana" <appanad@...inx.com>,
 <dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
 <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/1] dmaengine: xilinx_dma: Set dma_device.directions

When using the dma_get_slave_caps() API, it checks the directions fields of
the dma_device structure. Currently, the Xilinx DMA driver does not set
this, which causes dma_get_slave_caps() to return -ENXIO.

Fix this issue by setting the directions field of the dma_device
structure during DMA channel probe.

Signed-off-by: Folker Schwesinger <dev@...ker-schwesinger.de>
---
 drivers/dma/xilinx/xilinx_dma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 3ad44afd0e74..63c308f2ae81 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -2864,6 +2864,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
 	    of_device_is_compatible(node, "xlnx,axi-dma-mm2s-channel") ||
 	    of_device_is_compatible(node, "xlnx,axi-cdma-channel")) {
 		chan->direction = DMA_MEM_TO_DEV;
+		xdev->common.directions |= BIT(DMA_MEM_TO_DEV);
 		chan->id = xdev->mm2s_chan_id++;
 		chan->tdest = chan->id;
 
@@ -2881,6 +2882,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
 		   of_device_is_compatible(node,
 					   "xlnx,axi-dma-s2mm-channel")) {
 		chan->direction = DMA_DEV_TO_MEM;
+		xdev->common.directions |= BIT(DMA_DEV_TO_MEM);
 		chan->id = xdev->s2mm_chan_id++;
 		chan->tdest = chan->id - xdev->dma_config->max_channels / 2;
 		chan->has_vflip = of_property_read_bool(node,
-- 
2.48.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ