From: Andrew Lunn Date: Sat, 10 Nov 2018 22:43:37 +0000 (+0100) Subject: net: phy: Add support for resolving 5G and 2.5G autoneg X-Git-Tag: v5.4-rc1~1957^2~321^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb6402fe26358a33e32fb71054b248c76dcfe491;p=platform%2Fkernel%2Flinux-rpi.git net: phy: Add support for resolving 5G and 2.5G autoneg Now that 2.5G and 5G can be represented in phydev->advertising and phydev->lp_advertising, add these two links modes as possible resolutions to auto negotiation. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c index 6d274cd..20fbd5e 100644 --- a/drivers/net/phy/phy-core.c +++ b/drivers/net/phy/phy-core.c @@ -359,6 +359,14 @@ void phy_resolve_aneg_linkmode(struct phy_device *phydev) if (linkmode_test_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT, common)) { phydev->speed = SPEED_10000; phydev->duplex = DUPLEX_FULL; + } else if (linkmode_test_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT, + common)) { + phydev->speed = SPEED_5000; + phydev->duplex = DUPLEX_FULL; + } else if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, + common)) { + phydev->speed = SPEED_2500; + phydev->duplex = DUPLEX_FULL; } else if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, common)) { phydev->speed = SPEED_1000;