aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-03-25 19:34:58 +0100
committerDavid S. Miller <davem@davemloft.net>2019-03-27 13:51:49 -0700
commit3aeb0803f7ea11ff2fc478f7d58f2b8e713af380 (patch)
tree547d275b6edab2cc3e99b1d632da7cd05ab53461 /net/core
parentnet/core: Allow the compiler to verify declaration and definition consistency (diff)
downloadlinux-dev-3aeb0803f7ea11ff2fc478f7d58f2b8e713af380.tar.xz
linux-dev-3aeb0803f7ea11ff2fc478f7d58f2b8e713af380.zip
ethtool: add PHY Fast Link Down support
This adds support for Fast Link Down as new PHY tunable. Fast Link Down reduces the time until a link down event is reported for 1000BaseT. According to the standard it's 750ms what is too long for several use cases. v2: - add comment describing the constants Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/ethtool.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index b1eb32419732..387d67eb75ab 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -136,6 +136,7 @@ static const char
phy_tunable_strings[__ETHTOOL_PHY_TUNABLE_COUNT][ETH_GSTRING_LEN] = {
[ETHTOOL_ID_UNSPEC] = "Unspec",
[ETHTOOL_PHY_DOWNSHIFT] = "phy-downshift",
+ [ETHTOOL_PHY_FAST_LINK_DOWN] = "phy-fast-link-down",
};
static int ethtool_get_features(struct net_device *dev, void __user *useraddr)
@@ -2432,6 +2433,7 @@ static int ethtool_phy_tunable_valid(const struct ethtool_tunable *tuna)
{
switch (tuna->id) {
case ETHTOOL_PHY_DOWNSHIFT:
+ case ETHTOOL_PHY_FAST_LINK_DOWN:
if (tuna->len != sizeof(u8) ||
tuna->type_id != ETHTOOL_TUNABLE_U8)
return -EINVAL;