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: <3l5dqipd73vb3p2wrsycg2ft7cyqa6f7kumovakdpxqktga5ve@eegtzwv65d5f>
Date: Thu, 4 Jan 2024 15:59:09 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Vladimir Oltean <vladimir.oltean@....com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "David S. Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Andrew Lunn
	<andrew@...n.ch>, Florian Fainelli <f.fainelli@...il.com>, Luiz Angelo Daros
 de Luca <luizluca@...il.com>, Linus Walleij <linus.walleij@...aro.org>,
	Florian Fainelli <florian.fainelli@...adcom.com>, Hauke Mehrtens
	<hauke@...ke-m.de>, Christian Marangi <ansuelsmth@...il.com>,
	Arınç ÜNAL <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next 09/10] net: dsa: bcm_sf2: stop assigning an OF
 node to the ds->user_mii_bus

On Thu, Jan 04, 2024 at 04:00:36PM +0200, Vladimir Oltean wrote:
> The bcm_sf2 driver does something strange. Instead of calling
> of_mdiobus_register() with an OF node argument, it manually assigns the
> bus->dev->of_node and then calls the non-OF mdiobus_register(). This
> circumvents some code from __of_mdiobus_register() from running, which
> sets the auto-scan mask, parses some device tree properties, etc.
> 
> I'm going to go out on a limb and say that the OF node isn't, in fact,
> needed at all, and can be removed. The MDIO diversion as initially
> implemented in commit 461cd1b03e32 ("net: dsa: bcm_sf2: Register our
> slave MDIO bus") looked quite different than it is now, after commit
> 771089c2a485 ("net: dsa: bcm_sf2: Ensure that MDIO diversion is used").
> Initially, it made sense, as bcm_sf2 was registering another set of
> driver ops for the "brcm,unimac-mdio" OF node. But now, it deletes all
> phandles, which makes "phy-handle"s unable to find PHYs, which means
> that it always goes through the OF-unaware dsa_user_phy_connect().
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>

Reviewed-by: Alvin Šipraga <alsi@...g-olufsen.dk>

> ---
>  drivers/net/dsa/bcm_sf2.c | 1 -
>  1 file changed, 1 deletion(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ