]> git.baikalelectronics.ru Git - kernel.git/commit
igb: check for Tx timestamp timeouts during watchdog
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 3 May 2017 17:29:03 +0000 (10:29 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 6 Jun 2017 08:03:17 +0000 (01:03 -0700)
commit39a730dc03afb9e48b0a9f9876a4a87710bd7a5d
tree0134b19453dffb2d38d81e969b3f2911883b25db
parentf81f242503e0a01000aadefc5a022eef6fd32abf
igb: check for Tx timestamp timeouts during watchdog

The igb driver has logic to handle only one Tx timestamp at a time,
using a state bit lock to avoid multiple requests at once.

It may be possible, if incredibly unlikely, that a Tx timestamp event is
requested but never completes. Since we use an interrupt scheme to
determine when the Tx timestamp occurred we would never clear the state
bit in this case.

Add an igb_ptp_tx_hang() function similar to the already existing
igb_ptp_rx_hang() function. This function runs in the watchdog routine
and makes sure we eventually recover from this case instead of
permanently disabling Tx timestamps.

Note: there is no currently known way to cause this without hacking the
driver code to force it.

Signed-off-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>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igb/igb_ptp.c