]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 2 Aug 2022 00:24:19 +0000 (17:24 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 24 Aug 2022 19:21:10 +0000 (12:21 -0700)
commit69e7649c465c8c3f13eede2da6a2437b06b5d824
tree9ed745140bf9cbdf6923f5134644f440d2a3ac96
parentb8ee4cea3cee808b230698d4a3c062699fdcb10f
ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter

The ixgbe_ptp_start_cyclecounter is intended to be called whenever the
cyclecounter parameters need to be changed.

Since commit e910152ac626 ("ixgbe: Update PTP to support X550EM_x
devices"), this function has cleared the SYSTIME registers and reset the
TSAUXC DISABLE_SYSTIME bit.

While these need to be cleared during ixgbe_ptp_reset, it is wrong to clear
them during ixgbe_ptp_start_cyclecounter. This function may be called
during both reset and link status change. When link changes, the SYSTIME
counter is still operating normally, but the cyclecounter should be updated
to account for the possibly changed parameters.

Clearing SYSTIME when link changes causes the timecounter to jump because
the cycle counter now reads zero.

Extract the SYSTIME initialization out to a new function and call this
during ixgbe_ptp_reset. This prevents the timecounter adjustment and avoids
an unnecessary reset of the current time.

This also restores the original SYSTIME clearing that occurred during
ixgbe_ptp_reset before the commit above.

Reported-by: Steve Payne <spayne@aurora.tech>
Reported-by: Ilya Evenbach <ievenbach@aurora.tech>
Fixes: e910152ac626 ("ixgbe: Update PTP to support X550EM_x devices")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c