Re: [PATCH net-next v2] net: mdio: handle broken-turn-around for non-PHY MDIO devices

From: Andrew Lunn

Date: Wed Nov 25 2026 - 09:38:49 EST


> [Severity: Medium]
> With the parse removed here, what happens to PHYs registered through the
> exported of_mdiobus_phy_device_register()?
>
> drivers/net/mdio/of_mdio.c:of_mdiobus_phy_device_register() {
> return fwnode_mdiobus_phy_device_register(mdio, phy,
> of_fwnode_handle(child),
> addr);
> }
>
> This wrapper never goes through of_mdiobus_register_phy(), so it never
> reaches the new parse.
>
> Its in-tree caller, tja1102_p1_register() in drivers/net/phy/nxp-tja11xx.c,
> registers the port 1 PHY from a DT child node:
>
> ret = of_mdiobus_phy_device_register(bus, phy, child, addr);
>
> and does not set phy_ignore_ta_mask itself.

It feels like we are putting in too much effort for a feature which
has no in kernel users.

You solution is not 100% correct, it has some corner cases, but i'm
happy with the basic architecture of doing it once at a higher
level. If a new user comes along and lands in one of those corners,
let leave it to them to fix.

> [Severity: Medium]
> The bit is now set before fwnode_mdiobus_register_phy()->get_phy_device()
> checks whether anything answers at addr. Is it intended that nothing clears
> it when registration fails?

If the device comes to life later, it still has broken turn around, so
this is not a problem.

Andrew