diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-12-09 12:08:35 +0000 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2014-06-19 00:25:56 +0200 |
commit | d100b2748ac930237a97646ae9a4721a7f62acc1 (patch) | |
tree | 5fcee71d7e62fbbc17c01227e5cabbbd9d2cd46d /include/linux/ethtool.h | |
parent | 7f62be2f53a2353a7e5c124075ec22a4344e8d57 (diff) |
ethtool: Report link-down while interface is down
While an interface is down, many implementations of
ethtool_ops::get_link, including the default, ethtool_op_get_link(),
will report the last link state seen while the interface was up. In
general the current physical link state is not available if the
interface is down.
Define ETHTOOL_GLINK to reflect whether the interface *and* any
physical port have a working link, and consistently return 0 when the
interface is down.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit e596e6e4d578f2639416e620d367a3af34814a40)
Cc: Wang Weidong <wangweidong1@huawei.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 7ffab7cb9ee3..3a0fae6e327d 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h @@ -517,7 +517,9 @@ struct ethtool_ops { #define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ #define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ #define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ -#define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ +/* Get link status for host, i.e. whether the interface *and* the + * physical port (if there is one) are up (ethtool_value). */ +#define ETHTOOL_GLINK 0x0000000a #define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ #define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ #define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ |