diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2024-02-14 21:18:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-17 19:45:06 +0100 |
commit | 1bbe04e305fb2b5127650e6f2c0dbd611e8ebb14 (patch) | |
tree | 9a31fe037fde2278004c1130b41578f19a1d646f /drivers/net/phy/phy-c45.c | |
parent | net: phy: c45: add and use genphy_c45_read_eee_cap2 (diff) | |
download | linux-1bbe04e305fb2b5127650e6f2c0dbd611e8ebb14.tar.xz linux-1bbe04e305fb2b5127650e6f2c0dbd611e8ebb14.zip |
net: phy: c45: add support for EEE link partner ability 2 to genphy_c45_read_eee_lpa
Add support for reading EEE link partner ability 2 register.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy-c45.c')
-rw-r--r-- | drivers/net/phy/phy-c45.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 5a245f0cc8b1..b09c6baf0c08 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -781,6 +781,17 @@ static int genphy_c45_read_eee_lpa(struct phy_device *phydev, mii_eee_cap1_mod_linkmode_t(lpa, val); } + if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP2_FEATURES)) { + /* IEEE 802.3-2022 45.2.7.17 EEE link partner ability 2 + * (Register 7.63) + */ + val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_EEE_LPABLE2); + if (val < 0) + return val; + + mii_eee_cap2_mod_linkmode_adv_t(lpa, val); + } + if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT, phydev->supported_eee)) { /* IEEE 802.3cg-2019 45.2.7.26 10BASE-T1 AN status register |