linux/drivers/net/ethernet/intel
Miroslav Lichvar e1f65b0d70 e1000e: allow non-monotonic SYSTIM readings
It seems with some NICs supported by the e1000e driver a SYSTIM reading
may occasionally be few microseconds before the previous reading and if
enabled also pass e1000e_sanitize_systim() without reaching the maximum
number of rereads, even if the function is modified to check three
consecutive readings (i.e. it doesn't look like a double read error).
This causes an underflow in the timecounter and the PHC time jumps hours
ahead.

This was observed on 82574, I217 and I219. The fastest way to reproduce
it is to run a program that continuously calls the PTP_SYS_OFFSET ioctl
on the PHC.

Modify e1000e_phc_gettime() to use timecounter_cyc2time() instead of
timecounter_read() in order to allow non-monotonic SYSTIM readings and
prevent the PHC from jumping.

Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.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>
2018-11-07 09:47:01 -08:00
..
e1000 e1000: remove set but not used variable 'txb2b' 2018-09-19 23:09:23 -07:00
e1000e e1000e: allow non-monotonic SYSTIM readings 2018-11-07 09:47:01 -08:00
fm10k fm10k: bump driver version to match out-of-tree release 2018-10-31 10:49:15 -07:00
i40e i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE 2018-11-07 09:47:01 -08:00
iavf intel-ethernet: software timestamp skbs as late as possible 2018-11-07 09:47:01 -08:00
ice ice: Poll for link status change 2018-10-24 14:30:40 -07:00
igb i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE 2018-11-07 09:47:01 -08:00
igbvf igbvf: Replace spin_is_locked() with lockdep 2018-11-07 09:47:00 -08:00
igc igc: Tidy up some white space 2018-11-07 09:47:01 -08:00
ixgb Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
ixgbe i40e/ixgbe/igb: fail on new WoL flag setting WAKE_MAGICSECURE 2018-11-07 09:47:01 -08:00
ixgbevf ixgbevf: add support for software timestamps 2018-11-07 09:47:00 -08:00
e100.c intel-ethernet: use correct module license 2018-09-18 15:32:59 -07:00
Kconfig ixgbe/ixgbevf: fix XFRM_ALGO dependency 2018-10-31 10:53:15 -07:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00