Re: [PATCH] net: mdio: fix duplicate registrations for phy with c45 in __of_mdiobus_register()

From: Andrew Lunn
Date: Sun Jun 11 2023 - 11:14:34 EST


On Sun, Jun 11, 2023 at 10:57:28PM +0800, Jianhui Zhao wrote:
> Sorry, I misread the code.

So this is by code inspection, not an actual device tree booting on a
board?

What should happen is that __of_mdiobus_register() has:

/* Mask out all PHYs from auto probing. Instead the PHYs listed in
* the device tree are populated after the bus has been registered */
mdio->phy_mask = ~0;

So when

rc = __mdiobus_register(mdio, owner);

is called, no scanning happens. I _guess_ that is what you missed?

Andrew

--
pw-bot: reject