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]
Date:   Mon, 20 Mar 2023 12:57:52 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Álvaro Fernández Rojas <noltari@...il.com>,
        andrew@...n.ch, olteanv@...il.com, davem@...emloft.net,
        edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] net: dsa: b53: mmap: allow passing a chip ID

On 3/20/23 08:50, Álvaro Fernández Rojas wrote:
> BCM63268 SoCs require a special handling for their RGMIIs, so we should be
> able to identify them as a special BCM63xx switch.
> 
> Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
> ---
>   drivers/net/dsa/b53/b53_mmap.c | 32 +++++++++++++++++++++++---------
>   drivers/net/dsa/b53/b53_priv.h |  9 ++++++++-
>   2 files changed, 31 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c
> index 464c77e10f60..706df04b6cee 100644
> --- a/drivers/net/dsa/b53/b53_mmap.c
> +++ b/drivers/net/dsa/b53/b53_mmap.c
> @@ -248,7 +248,7 @@ static int b53_mmap_probe_of(struct platform_device *pdev,
>   		return -ENOMEM;
>   
>   	pdata->regs = mem;
> -	pdata->chip_id = BCM63XX_DEVICE_ID;
> +	pdata->chip_id = (u32)device_get_match_data(dev);
>   	pdata->big_endian = of_property_read_bool(np, "big-endian");
>   
>   	of_ports = of_get_child_by_name(np, "ports");
> @@ -330,14 +330,28 @@ static void b53_mmap_shutdown(struct platform_device *pdev)
>   }
>   
>   static const struct of_device_id b53_mmap_of_table[] = {
> -	{ .compatible = "brcm,bcm3384-switch" },
> -	{ .compatible = "brcm,bcm6318-switch" },
> -	{ .compatible = "brcm,bcm6328-switch" },
> -	{ .compatible = "brcm,bcm6362-switch" },
> -	{ .compatible = "brcm,bcm6368-switch" },
> -	{ .compatible = "brcm,bcm63268-switch" },
> -	{ .compatible = "brcm,bcm63xx-switch" },
> -	{ /* sentinel */ },
> +	{
> +		.compatible = "brcm,bcm3384-switch",
> +		.data = (void *)BCM63XX_DEVICE_ID,
> +	}, {
> +		.compatible = "brcm,bcm6318-switch",
> +		.data = (void *)BCM63XX_DEVICE_ID,

You will want to also pass BCM63268_DEVICE_ID here, see my comment in 
patch 4.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ