2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev-linux: Use ethtool when miimon fails.

Some network drivers might return true to SIOCGMIIPHY and an error on
SIOCGMIIREG when using MII to query phy state. Fall back to ethtool if this
happens to allow failover to work when using such nics.

Reported-at: http://openvswitch.org/pipermail/dev/2016-August/078800.html
Signed-off-by: David Hill <dhill@redhat.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
This commit is contained in:
David Hill
2016-08-30 15:13:31 -04:00
committed by Joe Stringer
parent 2b02d770c4
commit 9120cfc05c
2 changed files with 3 additions and 3 deletions

View File

@@ -1486,10 +1486,9 @@ netdev_linux_get_miimon(const char *name, bool *miimon)
if (!error) {
*miimon = !!(data.val_out & BMSR_LSTATUS);
} else {
VLOG_WARN_RL(&rl, "%s: failed to query MII", name);
}
} else {
}
if (error) {
struct ethtool_cmd ecmd;
VLOG_DBG_RL(&rl, "%s: failed to query MII, falling back to ethtool",