diff options
author | Marco Hartmann <marco.hartmann@nxp.com> | 2019-08-21 11:00:46 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-10 10:35:09 +0100 |
commit | c7f05c1d9bf477d6f3a3067ec74505f88dfda2f3 (patch) | |
tree | b13a775ecb30f2dcdae08816c002c02a5e5e1375 /include | |
parent | 98ded313ffda65bcd47556270143eaaea9e27e0f (diff) | |
download | linux-stable-c7f05c1d9bf477d6f3a3067ec74505f88dfda2f3.tar.gz linux-stable-c7f05c1d9bf477d6f3a3067ec74505f88dfda2f3.tar.bz2 linux-stable-c7f05c1d9bf477d6f3a3067ec74505f88dfda2f3.zip |
Add genphy_c45_config_aneg() function to phy-c45.c
[ Upstream commit 2ebb991641d3f64b70fec0156e2b6933810177e9 ]
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")
Signed-off-by: Marco Hartmann <marco.hartmann@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 6424586fe2d6..7c5a9fb9c9f4 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1108,6 +1108,7 @@ int genphy_c45_an_disable_aneg(struct phy_device *phydev); int genphy_c45_read_mdix(struct phy_device *phydev); int genphy_c45_pma_read_abilities(struct phy_device *phydev); int genphy_c45_read_status(struct phy_device *phydev); +int genphy_c45_config_aneg(struct phy_device *phydev); /* The gen10g_* functions are the old Clause 45 stub */ int gen10g_config_aneg(struct phy_device *phydev); |