diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2022-06-06 22:02:08 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-13 23:11:24 -0700 |
commit | bfa54812f0bc802819051b4084cd07a3d467ce79 (patch) | |
tree | 98b4b875fb8cc3ac05dcb97ba55a438b51151bc8 /drivers/net/phy/fixed_phy.c | |
parent | c04245328dd7e915e21ac6395ffd218616e22754 (diff) | |
download | linux-stable-bfa54812f0bc802819051b4084cd07a3d467ce79.tar.gz linux-stable-bfa54812f0bc802819051b4084cd07a3d467ce79.tar.bz2 linux-stable-bfa54812f0bc802819051b4084cd07a3d467ce79.zip |
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>
Diffstat (limited to 'drivers/net/phy/fixed_phy.c')
-rw-r--r-- | drivers/net/phy/fixed_phy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c index 03abe6233bbb..aef739c20ac4 100644 --- a/drivers/net/phy/fixed_phy.c +++ b/drivers/net/phy/fixed_phy.c @@ -353,6 +353,7 @@ static int __init fixed_mdio_bus_init(void) fmb->mii_bus->parent = &pdev->dev; fmb->mii_bus->read = &fixed_mdio_read; fmb->mii_bus->write = &fixed_mdio_write; + fmb->mii_bus->phy_mask = ~0; ret = mdiobus_register(fmb->mii_bus); if (ret) |