From: Auke Kok e1000: Don't do PHY reads in watchdog unless link status is down The watchdog runs code that every 2 seconds performs several PHY reads that are locked with the swfw semaphore, causing the semaphore to be unavailable for a short time. This is completely unneeded in case the MAC detects PHY link up (LU). Signed-off-by: Auke Kok --- drivers/net/e1000/e1000_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 34d8e5d..9660925 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -2556,6 +2556,10 @@ e1000_watchdog(unsigned long data) uint32_t link, tctl; int32_t ret_val; + if ((netif_carrier_ok(netdev)) && + (E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU)) + goto link_up; + ret_val = e1000_check_for_link(&adapter->hw); if ((ret_val == E1000_ERR_PHY) && (adapter->hw.phy_type == e1000_phy_igp_3) && @@ -2684,6 +2688,7 @@ e1000_watchdog(unsigned long data) e1000_smartspeed(adapter); } +link_up: e1000_update_stats(adapter); adapter->hw.tx_packet_delta = adapter->stats.tpt - adapter->tpt_old;