[PATCH iwl-net v2 04/14] ice: E822: keep Tx timestamps disabled during offset calibration
Nowlin, Alexander
alexander.nowlin at intel.com
Tue Sep 8 18:03:48 UTC 2026
> -----Original Message-----
> From: Keller, Jacob E <jacob.e.keller at intel.com>
> Sent: Tuesday, August 25, 2026 3:53 PM
> To: Intel Wired LAN <intel-wired-lan at lists.osuosl.org>
> Cc: netdev at vger.kernel.org; Machnikowski, Maciej <maciej.machnikowski at intel.com>; Nguyen, Anthony L <anthony.l.nguyen at intel.com>; Korba, Przemyslaw <przemyslaw.korba at intel.com>; Nitka, Grzegorz <grzegorz.nitka at intel.com>; Oros, Petr <poros at redhat.com>; Nowlin, Alexander <alexander.nowlin at intel.com>; Bross, Kevin <kevin.bross at intel.com>; Cavatur, Ranjit <ranjit.cavatur at intel.com>; Keller, Jacob E <jacob.e.keller at intel.com>; Karol Kolacinski <karol.kolacinski at intel.com>; Loktionov, Aleksandr <aleksandr.loktionov at intel.com>; Kubalewski, Arkadiusz <arkadiusz.kubalewski at intel.com>; Korba, Przemyslaw <przemyslaw.korba at intel.com>
> Subject: [PATCH iwl-net v2 04/14] ice: E822: keep Tx timestamps disabled during offset calibration
>
> From: Karol Kolacinski <karol.kolacinski at intel.com>
>
> Do not clear the tx.calibrating flag immediately after starting the PHY timer in ice_ptp_port_phy_restart(). Instead, keep Tx timestamps disabled until the offset verification work (ice_ptp_wait_for_offsets) has confirmed that both Tx and Rx PHY offsets are properly configured.
>
> Previously, tx.calibrating was set to true, then immediately back to false right after ice_start_phy_timer_e82x() returned. This allowed Tx timestamp requests to be served during the window where offset verification was still pending. Timestamps produced during this window use uncalibrated PHY offsets and can produce incorrect values.
>
> When ptp4l receives incorrect timestamps, it may reject them and wait for the next sync interval (typically 1-2 seconds), compounding delays during link cycling. This contributes to the time transmitter port becoming unresponsive after repeated link down/up cycles.
>
> Move the tx.calibrating = false to ice_ptp_wait_for_offsets(), after both Tx and Rx offset configuration has completed successfully. This ensures that Tx timestamps are only reported with properly calibrated PHY > offsets.
>
> If ice_start_phy_timer_e82x() fails, do not restore calibrating to false.
> The device is in a state where timestamps cannot succeed properly anyways.
> A dev_err message is already logged on failure to start the timer at the end of the function.
>
> Log a debug message while offset calibration is still pending, including the specific Tx/Rx error codes to aid debugging stalled calibration.
> This path is expected on every routine link-up: ov_work is first queued with no delay and the vernier offset cannot be computed until at least one packet has been transmitted, so the first several invocations normally land here. Use dev_dbg() rather than a rate-limited warning to avoid emitting KERN_WARNING on every link-up during normal operation.
> Log a debug message when calibration completes successfully.
>
> Fixes: 3a7496234d17 ("ice: implement basic E822 PTP support")
> Signed-off-by: Karol Kolacinski <karol.kolacinski at intel.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski at intel.com>
> Signed-off-by: Przemyslaw Korba <przemyslaw.korba at intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_ptp.c | 30 +++++++++++++++++++++++++-----
> 1 file changed, 25 insertions(+), 5 deletions(-)
Tested-by: Alexander Nowlin <alexander.nowlin at intel.com>
More information about the Intel-wired-lan
mailing list