> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Grzegorz Nitka > Sent: Monday, August 3, 2026 4:35 AM > To: [email protected] > Cc: Kitszel, Przemyslaw <[email protected]>; > [email protected]; [email protected]; Kubalewski, Arkadiusz > <[email protected]>; Korba, Przemyslaw > <[email protected]>; [email protected]; [email protected]; > Nguyen, Anthony L <[email protected]>; [email protected]; > [email protected]; [email protected]; [email protected] > Subject: [Intel-wired-lan] [PATCH v3 iwl-next 1/3] ice: monitor TSPLL lock > from PTP periodic worker > > On E825 devices that own the source timer, the TSPLL can lose lock when the > TCXO or TIME_REF signal is disrupted. Recovery requires re-enabling the TSPLL > via CGU register writes; without it, the PHC keeps running on a degraded > reference indefinitely. > > The DPLL periodic worker (ice_dpll_periodic_work()) would be a natural home > for this monitoring, but placing it there has two problems: > > 1. ice_dpll_init_e825() sets ICE_FLAG_DPLL only after all initialization > steps succeed. If any earlier step fails, the driver would run > without any TSPLL recovery mechanism. > > 2. When CONFIG_DPLL=n, the DPLL worker is compiled out and TSPLL > recovery would be silently absent. > > Add the monitor to ice_ptp_periodic_work() instead, which always runs on > E825 owner PFs regardless of DPLL init state or config. Introduce two small > helpers, ice_tspll_lost_lock_e825c() and ice_tspll_restart_e825c(), which > encapsulate the CGU register reads/writes required to observe and recover the > TSPLL. > > Cache the observed lock state in pf->ptp.tspll_locked using > WRITE_ONCE()/READ_ONCE() so a follow-up change can consume it from the DPLL > periodic worker (for user-space notification via > dpll_device_change_ntf()) and drop the redundant poll+recovery from that > path. Precise synchronization is not required: both workers converge on the > same value within one poll period. > > Reviewed-by: Przemyslaw Korba <[email protected]> > Signed-off-by: Grzegorz Nitka <[email protected]> > --- > drivers/net/ethernet/intel/ice/ice_ptp.c | 70 +++++++++++++++++ > drivers/net/ethernet/intel/ice/ice_ptp.h | 11 +++ > drivers/net/ethernet/intel/ice/ice_tspll.c | 88 +++++++++++++++++++++- > drivers/net/ethernet/intel/ice/ice_tspll.h | 4 + > 4 files changed, 172 insertions(+), 1 deletion(-)
Tested-by: Alexander Nowlin <[email protected]>
