Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: fixed_phy: set phy_mask before calling mdiobus_register()

There's no point probing for phys on this artificial bus, so we can
save a little bit of boot time by telling mdiobus_register() not to do
that.

This doesn't have any functional change, since, at this point,
fixed_mdio_read() returns 0xffff for all addresses/registers, so

mdiobus_scan() -> get_phy_device() -> get_phy_c22_id()

will return -ENODEV, which is just ignored.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220606200208.1665417-1-linux@rasmusvillemoes.dk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Rasmus Villemoes and committed by
Jakub Kicinski
bfa54812 c0424532

+1
+1
drivers/net/phy/fixed_phy.c
··· 353 353 fmb->mii_bus->parent = &pdev->dev; 354 354 fmb->mii_bus->read = &fixed_mdio_read; 355 355 fmb->mii_bus->write = &fixed_mdio_write; 356 + fmb->mii_bus->phy_mask = ~0; 356 357 357 358 ret = mdiobus_register(fmb->mii_bus); 358 359 if (ret)