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
| ||
|
Message-ID: <ZW840qQMbVRto442@shell.armlinux.org.uk> Date: Tue, 5 Dec 2023 14:50:58 +0000 From: "Russell King (Oracle)" <linux@...linux.org.uk> To: Andrew Lunn <andrew@...n.ch> Cc: Serge Semin <fancer.lancer@...il.com>, Heiner Kallweit <hkallweit1@...il.com>, Alexandre Torgue <alexandre.torgue@...s.st.com>, Jose Abreu <joabreu@...opsys.com>, Jose Abreu <Jose.Abreu@...opsys.com>, Maxime Chevallier <maxime.chevallier@...tlin.com>, Tomer Maimon <tmaimon77@...il.com>, Rob Herring <robh+dt@...nel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, openbmc@...ts.ozlabs.org, netdev@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH net-next 06/16] net: pcs: xpcs: Avoid creating dummy XPCS MDIO device On Tue, Dec 05, 2023 at 02:52:24PM +0100, Andrew Lunn wrote: > On Tue, Dec 05, 2023 at 02:31:41PM +0300, Serge Semin wrote: > > On Tue, Dec 05, 2023 at 10:49:47AM +0000, Russell King (Oracle) wrote: > > > On Tue, Dec 05, 2023 at 01:35:27PM +0300, Serge Semin wrote: > > > > If the DW XPCS MDIO devices are either left unmasked for being auto-probed > > > > or explicitly registered in the MDIO subsystem by means of the > > > > mdiobus_register_board_info() method there is no point in creating the > > > > dummy MDIO device instance in order to get the DW XPCS handler since the > > > > MDIO core subsystem will create the device during the MDIO bus > > > > registration procedure. > > > > > > > > Please reword this overly long sentence. > > > > Ok. > > > > > > > > If they're left unmasked, what prevents them being created as PHY > > > devices? > > > > Not sure I fully get what you meant. If they are left unmasked the > > MDIO-device descriptor will be created by the MDIO subsystem anyway. > > What the point in creating another one? > > Saying what Russell said, in a different way: > > /* > * Return true if the child node is for a phy. It must either: > * o Compatible string of "ethernet-phy-idX.X" > * o Compatible string of "ethernet-phy-ieee802.3-c45" > * o Compatible string of "ethernet-phy-ieee802.3-c22" > * o In the white list above (and issue a warning) > * o No compatibility string > * > * A device which is not a phy is expected to have a compatible string > * indicating what sort of device it is. > */ > bool of_mdiobus_child_is_phy(struct device_node *child) > > So when walking the bus, if a node is found which fits these criteria, > its assumed to be a PHY. > > Anything on the MDIO bus which is not a PHY needs to use a compatible. Right. I'd actually forgotten about the firmware-based walking, and was thinking more of the non-firmware bus scanning as the commit message was talking about being _unmasked_ and the only mask we have is bus->phy_mask. It seems to me that this is yet another case of a really confusing commit message making review harder than it needs to be. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists