]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: check for Tx timestamp timeouts during watchdog
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 3 May 2017 17:29:04 +0000 (10:29 -0700)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 13 Oct 2017 02:43:48 +0000 (19:43 -0700)
commitf0c0ce2881cec16c10dab36ec449052bdd8c7c10
tree2fc99df5adc2aca656e79fd05caaff0a7f7b771f
parentdd4ae01aab52f0196f6e0cb94cb782d23d531263
ixgbe: check for Tx timestamp timeouts during watchdog

The ixgbe 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 ixgbe_ptp_tx_hang() function similar to the already existing
ixgbe_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: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 26785078
(cherry picked from commit 622a2ef538fb3ca8eccf49716aba8267d6e95a47)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c