diff options
author | 2023-07-19 08:42:57 +0200 | |
---|---|---|
committer | 2023-07-20 12:24:06 +0200 | |
commit | a60eb72066af272c2891c6685b9a082dde69198c (patch) | |
tree | 28d2aa3482ccb148c4066b4d1285722776930cc8 /drivers | |
parent | net: phy: c45: add a separate function to read BASE-T1 abilities (diff) | |
download | linux-a60eb72066af272c2891c6685b9a082dde69198c.tar.gz linux-a60eb72066af272c2891c6685b9a082dde69198c.tar.bz2 linux-a60eb72066af272c2891c6685b9a082dde69198c.zip |
net: phy: c45: detect the BASE-T1 speed from the ability register
Read the ability to do 100BASE-T1 and 1000BASE-T1 from the extended
BASE-T1 ability register of the PHY.
Signed-off-by: Stefan Eichenberger <eichest@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy-c45.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index 58a6bbbe8a70..8e6fd4962c48 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -899,6 +899,14 @@ int genphy_c45_pma_baset1_read_abilities(struct phy_device *phydev) phydev->supported, val & MDIO_PMA_PMD_BT1_B10L_ABLE); + linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, + phydev->supported, + val & MDIO_PMA_PMD_BT1_B100_ABLE); + + linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, + phydev->supported, + val & MDIO_PMA_PMD_BT1_B1000_ABLE); + val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_STAT); if (val < 0) return val; |