summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igb/igb_main.c
diff options
context:
space:
mode:
authorMatthew Vick <matthew.vick@intel.com>2012-12-13 11:20:35 +0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-18 16:58:09 +0400
commitfc5807511699787f69b202d0382eb9f11e1da412 (patch)
tree77075a4d7b3c6ed23a7f32a2d8142e8f92e6d9aa /drivers/net/ethernet/intel/igb/igb_main.c
parent428f1f715131ea5ae32e29502541ce007f556b5b (diff)
downloadlinux-fc5807511699787f69b202d0382eb9f11e1da412.tar.xz
igb: Add mechanism for detecting latched hardware Rx timestamp
Add a check against possible Rx timestamp freezing in the hardware via watchdog mechanism. This situation can occur when an Rx timestamp has been latched, but the packet has been dropped because the Rx ring is full. Whenever a packet comes in that should be timestamped, the Rx timestamp gets latched into the hardware registers and we will store the jiffy value in the rx_ring. The watchdog will keep track of his own jiffy timer whenever there is no valid timestamp in the registers. If the watchdog detects a valid timestamp in the registers, meaning that no Rx packet has consumed it yet, it will check which time is most recent: the last time in the watchdog or any time in the rx_rings. If the most recent "event" was more than 5 seconds ago, it will flush the Rx timestamp and print a warning message to the syslog. Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Matthew Vick <matthew.vick@intel.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Acked-by: Jacob Keller <Jacob.e.keller@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb_main.c')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 9540a814a225..c9e438ba1ec2 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3991,6 +3991,7 @@ static void igb_watchdog_task(struct work_struct *work)
}
igb_spoof_check(adapter);
+ igb_ptp_rx_hang(adapter);
/* Reset the timer */
if (!test_bit(__IGB_DOWN, &adapter->state))