Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Stefan Eichenberger and committed by
Paolo Abeni
a60eb720 eba2e4c2

+8
+8
drivers/net/phy/phy-c45.c
··· 899 899 phydev->supported, 900 900 val & MDIO_PMA_PMD_BT1_B10L_ABLE); 901 901 902 + linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, 903 + phydev->supported, 904 + val & MDIO_PMA_PMD_BT1_B100_ABLE); 905 + 906 + linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, 907 + phydev->supported, 908 + val & MDIO_PMA_PMD_BT1_B1000_ABLE); 909 + 902 910 val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_T1_STAT); 903 911 if (val < 0) 904 912 return val;