|
@@ -190,6 +190,17 @@ static int e1000_get_settings(struct net_device *netdev,
|
|
|
static u32 e1000_get_link(struct net_device *netdev)
|
|
|
{
|
|
|
struct e1000_adapter *adapter = netdev_priv(netdev);
|
|
|
+ struct e1000_mac_info *mac = &adapter->hw.mac;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * If the link is not reported up to netdev, interrupts are disabled,
|
|
|
+ * and so the physical link state may have changed since we last
|
|
|
+ * looked. Set get_link_status to make sure that the true link
|
|
|
+ * state is interrogated, rather than pulling a cached and possibly
|
|
|
+ * stale link state from the driver.
|
|
|
+ */
|
|
|
+ if (!netif_carrier_ok(netdev))
|
|
|
+ mac->get_link_status = 1;
|
|
|
|
|
|
return e1000_has_link(adapter);
|
|
|
}
|