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: <e9be3f95-c33d-2e76-0ceb-17627973ec29@ti.com>
Date:   Tue, 3 Jan 2023 14:27:47 +0530
From:   Dhruva Gole <d-gole@...com>
To:     Vincent Whitchurch <vincent.whitchurch@...s.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        Mark Brown <broonie@...nel.org>
CC:     <kernel@...s.com>, <linux-arm-kernel@...ts.infradead.org>,
        <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: pl022: Only use DT-specified DMA channels

Hey Vincent,

On 02/01/23 21:38, Vincent Whitchurch wrote:
> When a platform is booted with devicetree and does not provide a
> platform data structure, the driver creates one internally.  enable_dma
> should not be set in this structure when creating it; the probe function
> will set it later if DMA channels are specified via the devicetree.

Yeah, I agree.

> 
> Setting enable_dma = 1 when creating this internal platform data can
> lead to pl022_dma_probe() finding bogus DMA channels (since there is no
> channel filter specified) when no DMA channels are specified in the
> devicetree.
> 
> Signed-off-by: Vincent Whitchurch <vincent.whitchurch@...s.com>
> ---

Acked-by: Dhruva Gole <d-gole@...com>

>   drivers/spi/spi-pl022.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index e4484ace584e..a17ff839117f 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -2091,7 +2091,6 @@ pl022_platform_data_dt_get(struct device *dev)
>   		return NULL;
>   
>   	pd->bus_id = -1;
> -	pd->enable_dma = 1;
>   	of_property_read_u32(np, "pl022,autosuspend-delay",
>   			     &pd->autosuspend_delay);
>   	pd->rt = of_property_read_bool(np, "pl022,rt");

-- 
Thanks and Regards,
Dhruva Gole

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ