Commit 34786005eca3 ("net: phy: prevent PHYs w/o Clause 22 regs from calling genphy_config_aneg") introduced a check that aborts phy_config_aneg() if the phy is a C45 phy. This causes phy_state_machine() to call phy_error() so that the phy ends up in PHY_HALTED state. Instead of returning -EOPNOTSUPP, call genphy_c45_config_aneg() (analogous to the C22 case) so that the state machine can run correctly. genphy_c45_config_aneg() closely resembles mv3310_config_aneg() in drivers/net/phy/marvell10g.c, excluding vendor specific configurations for 1000BaseT. Fixes: 22b56e827093 ("net: phy: replace genphy_10g_driver with genphy_c45_driver")
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -1107,6 +1107,7 @@ int genphy_c45_an_disable_aneg(struct phy_device *phydev); · 1106 unmodified lines | ||
| 1107 | 1107 | int genphy_c45_read_mdix(struct phy_device *phydev); |
| 1108 | 1108 | int genphy_c45_pma_read_abilities(struct phy_device *phydev); |
| 1109 | 1109 | int genphy_c45_read_status(struct phy_device *phydev); |
| 1110 | +int genphy_c45_config_aneg(struct phy_device *phydev); | |
| 1110 | 1111 | |
| 1111 | 1112 | /* The gen10g_* functions are the old Clause 45 stub */ |
| 1112 | 1113 | int gen10g_config_aneg(struct phy_device *phydev); |