diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-08-12 17:52:19 -0400 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-08-13 20:14:06 -0400 |
commit | 65b27995a4ab8fc51b4adc6b4dcdca20f7a595bb (patch) | |
tree | 7b8814cf8b7bd2767af3c3080b20c9b9c4a2b70f /include/linux/phy.h | |
parent | 331c56ac73846fa267c04ee6aa9a00bb5fed9440 (diff) |
net: phy: let phy_speed_down/up support speeds >1Gbps
So far phy_speed_down/up can be used up to 1Gbps only. Remove this
restriction by using new helper __phy_speed_down. New member adv_old
in struct phy_device is used by phy_speed_up to restore the advertised
modes before calling phy_speed_down. Don't simply advertise what is
supported because a user may have intentionally removed modes from
advertisement.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 62fdc7ff2b24..5ac7d21375ac 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -403,6 +403,8 @@ struct phy_device { | |||
403 | __ETHTOOL_DECLARE_LINK_MODE_MASK(supported); | 403 | __ETHTOOL_DECLARE_LINK_MODE_MASK(supported); |
404 | __ETHTOOL_DECLARE_LINK_MODE_MASK(advertising); | 404 | __ETHTOOL_DECLARE_LINK_MODE_MASK(advertising); |
405 | __ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising); | 405 | __ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising); |
406 | /* used with phy_speed_down */ | ||
407 | __ETHTOOL_DECLARE_LINK_MODE_MASK(adv_old); | ||
406 | 408 | ||
407 | /* Energy efficient ethernet modes which should be prohibited */ | 409 | /* Energy efficient ethernet modes which should be prohibited */ |
408 | u32 eee_broken_modes; | 410 | u32 eee_broken_modes; |