aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
authorRobert Hancock <hancock@sedsystems.ca>2019-06-04 16:15:01 -0600
committerDavid S. Miller <davem@davemloft.net>2019-06-06 13:48:51 -0700
commitca72efb6bdc733006f335ca12ca615395077a873 (patch)
treebd4a906e29ca48574ef2ff978f3357efdb7bfe77 /drivers/net/phy/phy_device.c
parentnet: mscc: ocelot: remove unused variable 'vcap_data_t' (diff)
downloadlinux-dev-ca72efb6bdc733006f335ca12ca615395077a873.tar.xz
linux-dev-ca72efb6bdc733006f335ca12ca615395077a873.zip
net: phy: Add detection of 1000BaseX link mode support
Add 1000BaseX to the link modes which are detected based on the MII_ESTATUS register as per 802.3 Clause 22. This allows PHYs which support 1000BaseX to work properly with drivers using phylink. Previously 1000BaseX support was not detected, and if that was the only mode the PHY indicated support for, phylink would refuse to attach it due to the list of supported modes being empty. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 2c879ba01f35..03c885ec1f98 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1930,6 +1930,9 @@ int genphy_config_init(struct phy_device *phydev)
if (val & ESTATUS_1000_THALF)
linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
features);
+ if (val & ESTATUS_1000_XFULL)
+ linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
+ features);
}
linkmode_and(phydev->supported, phydev->supported, features);