diff options
author | Andrew Lunn <andrew@lunn.ch> | 2024-02-05 00:14:15 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-07 14:47:07 +0100 |
commit | 88b3934e3f31e15b40896aa8ebb0a8040d150c1c (patch) | |
tree | 248220afd188134d8f429004bc3dde7b375a3cef /drivers/net/dsa/mv88e6xxx | |
parent | net: phy: c45 scanning: Don't consider -ENODEV fatal (diff) | |
download | linux-88b3934e3f31e15b40896aa8ebb0a8040d150c1c.tar.xz linux-88b3934e3f31e15b40896aa8ebb0a8040d150c1c.zip |
net: dsa: mv88e6xxx: Return -ENODEV when C45 not supported
MDIO bus drivers can return -ENODEV when they know the bus does not
have a device at the given address, e.g. because of hardware
limitation. One such limitation is that the bus does not support C45
at all. This is more efficient than returning 0xffff, since it
immediately stops the probing on the given address, where as further
reads can be made when 0xffff is returned.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 6eec2e4aa031..9caecb4dfbfa 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3659,7 +3659,7 @@ static int mv88e6xxx_mdio_read_c45(struct mii_bus *bus, int phy, int devad, int err; if (!chip->info->ops->phy_read_c45) - return 0xffff; + return -ENODEV; mv88e6xxx_reg_lock(chip); err = chip->info->ops->phy_read_c45(chip, bus, phy, devad, reg, &val); |