--- zzzz-none-000/linux-3.10.107/net/core/link_watch.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/net/core/link_watch.c 2021-02-04 17:41:59.000000000 +0000 @@ -21,7 +21,7 @@ #include #include #include -#include +#include enum lw_bits { @@ -40,7 +40,7 @@ static unsigned char default_operstate(const struct net_device *dev) { if (!netif_carrier_ok(dev)) - return (dev->ifindex != dev->iflink ? + return (dev->ifindex != dev_get_iflink(dev) ? IF_OPER_LOWERLAYERDOWN : IF_OPER_DOWN); if (netif_dormant(dev)) @@ -89,7 +89,10 @@ if (!netif_running(dev)) return false; - if (dev->ifindex != dev->iflink) + if (dev->ifindex != dev_get_iflink(dev)) + return true; + + if (dev->priv_flags & IFF_TEAM_PORT) return true; return netif_carrier_ok(dev) && qdisc_tx_changing(dev); @@ -144,7 +147,7 @@ * Make sure the above read is complete since it can be * rewritten as soon as we clear the bit below. */ - smp_mb__before_clear_bit(); + smp_mb__before_atomic(); /* We are about to handle this device, * so new events can be accepted