linux/drivers/net/ethernet/intel
Jacob Keller aa524b66c5 e1000e: don't modify SYSTIM registers during SIOCSHWTSTAMP ioctl
The e1000e_config_hwtstamp function was incorrectly resetting the SYSTIM
registers every time the ioctl was being run. If you happened to be
running ptp4l and lost the PTP connect (removing cable, or blocking the
UDP traffic for example), then ptp4l will eventually perform a restart
which involves re-requesting timestamp settings. In e1000e this has the
unfortunate and incorrect result of resetting SYSTIME to the kernel
time. Since kernel time is usually in UTC, and PTP time is in TAI, this
results in the leap second being re-applied.

Fix this by extracting the SYSTIME reset out into its own function,
e1000e_ptp_reset, which we call during reset to restore the hardware
registers. This function will (a) restart the timecounter based on the
new system time, (b) restore the previous PPB setting, and (c) restore
the previous hwtstamp settings.

In order to perform (b), I had to modify the adjfreq ptp function
pointer to store the old delta each time it is called. This also has the
side effect of restoring the correct base timinca register correctly.
The driver does not need to explicitly zero the ptp_delta variable since
the entire adapter structure comes zero-initialized.

Reported-by: Brian Walsh <brian@walsh.ws>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Brian Walsh <brian@walsh.ws>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-05-13 15:30:44 -07:00
..
e1000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-04-09 17:41:41 -04:00
e1000e e1000e: don't modify SYSTIM registers during SIOCSHWTSTAMP ioctl 2016-05-13 15:30:44 -07:00
fm10k treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
i40e i40e: constify i40e_client_ops structure 2016-05-05 23:32:59 -07:00
i40evf i40evf: Allocate Rx buffers properly 2016-05-05 23:07:30 -07:00
igb igb/igbvf: Add support for GSO partial 2016-05-13 15:26:37 -07:00
igbvf igb/igbvf: Add support for GSO partial 2016-05-13 15:26:37 -07:00
ixgb drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
ixgbe Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 2016-05-04 17:13:34 -04:00
ixgbevf ixgbevf: Remove unused parameter 2016-05-04 00:24:32 -07:00
e100.c e100: Release skb when DMA mapping is failed in e100_xmit_prepare 2015-08-18 14:06:05 -07:00
Kconfig net: intel: remove dead links 2016-04-06 20:54:45 -07:00
Makefile fm10k: Add skeletal frame for Intel(R) FM10000 Ethernet Switch Host Interface Driver 2014-09-23 03:59:13 -07:00