mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
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>
This commit is contained in:
parent
eba2e4c2fa
commit
a60eb72066
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user