net: phy: c45 scanning: Don't consider -ENODEV fatal
authorAndrew Lunn <andrew@lunn.ch>
Sun, 4 Feb 2024 23:14:14 +0000 (17:14 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Feb 2024 13:47:07 +0000 (13:47 +0000)
commit17b447539408a0feff81637c7cc1c4c68efa73c0
tree6794309990ad7ddc60b73eb92d26439acf902932
parent56b93cd358b304b2d1945c0330dffe8f872bc0d3
net: phy: c45 scanning: Don't consider -ENODEV fatal

When scanning the MDIO bus for C22 devices, the driver returning
-ENODEV is not considered fatal, it just indicates the MDIO bus master
knows there is no device at that address, maybe because of hardware
limitation.

Make the C45 scan code act on -ENODEV the same way, to make C22 and
C45 more uniform.

It is expected all reads for a given address will return -ENODEV, so
within get_phy_c45_ids() only the first place a read occurs has been
changed.

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c