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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <MN0PR12MB5953C8800220724906360D54B788A@MN0PR12MB5953.namprd12.prod.outlook.com>
Date: Wed, 7 May 2025 10:20:51 +0000
From: "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>
To: Thomas Gessler <thomas.gessler@...eckmann-gmbh.de>,
	"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>
CC: Vinod Koul <vkoul@...nel.org>, "Simek, Michal" <michal.simek@....com>,
	Marek Vasut <marex@...x.de>, Uwe Kleine-König
	<u.kleine-koenig@...libre.com>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Katakam, Harini" <harini.katakam@....com>,
	"Gupta, Suraj" <Suraj.Gupta2@....com>
Subject: RE: [PATCH] dmaengine: xilinx_dma: Set dma_device directions

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Pandey, Radhey Shyam
> Sent: Monday, March 17, 2025 12:18 PM
> To: Thomas Gessler <thomas.gessler@...eckmann-gmbh.de>;
> dmaengine@...r.kernel.org
> Cc: Vinod Koul <vkoul@...nel.org>; Simek, Michal <michal.simek@....com>;
> Marek Vasut <marex@...x.de>; Uwe Kleine-König <u.kleine-
> koenig@...libre.com>; linux-arm-kernel@...ts.infradead.org; linux-
> kernel@...r.kernel.org; Katakam, Harini <harini.katakam@....com>
> Subject: RE: [PATCH] dmaengine: xilinx_dma: Set dma_device directions
>
> > -----Original Message-----
> > From: Thomas Gessler <thomas.gessler@...eckmann-gmbh.de>
> > Sent: Friday, March 14, 2025 7:19 PM
> > To: dmaengine@...r.kernel.org
> > Cc: Thomas Gessler <thomas.gessler@...eckmann-gmbh.de>; Vinod Koul
> > <vkoul@...nel.org>; Simek, Michal <michal.simek@....com>; Marek Vasut
> > <marex@...x.de>; Pandey, Radhey Shyam
> <radhey.shyam.pandey@....com>;
> > Uwe Kleine-König <u.kleine-koenig@...libre.com>; linux-arm-
> > kernel@...ts.infradead.org; linux-kernel@...r.kernel.org
> > Subject: [PATCH] dmaengine: xilinx_dma: Set dma_device directions
> >
> > 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@...eckmann-gmbh.de>
>
> Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@....com>
> Thanks!
>
> > ---
> >  drivers/dma/xilinx/xilinx_dma.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/dma/xilinx/xilinx_dma.c
> > b/drivers/dma/xilinx/xilinx_dma.c index 108a7287f4cd..641aaf0c0f1c
> > 100644
> > --- a/drivers/dma/xilinx/xilinx_dma.c
> > +++ b/drivers/dma/xilinx/xilinx_dma.c
> > @@ -3205,6 +3205,10 @@ static int xilinx_dma_probe(struct
> > platform_device
> > *pdev)
> >             }
> >     }
> >
> > +   for (i = 0; i < xdev->dma_config->max_channels; i++)
> > +           if (xdev->chan[i])
> > +                   xdev->common.directions |= xdev->chan[i]->direction;
> > +

Suraj also worked on this patch internally and he did set direction in chan_probe().
So, I think we can switch to below implementation ?

--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -2909,6 +2909,7 @@ static int xilinx_dma_chan_probe(struct xilinx_dma_device *xdev,
                return -EINVAL;
        }

+       xdev->common.directions |= chan->direction;


> >     if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
> >             for (i = 0; i < xdev->dma_config->max_channels; i++)
> >                     if (xdev->chan[i])
> > --
> > 2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ