[PATCH iwl-net v2 06/14] ice: call PTP link change only from link events

Nowlin, Alexander alexander.nowlin at intel.com
Tue Sep 8 18:04:46 UTC 2026


> -----Original Message-----
> From: Keller, Jacob E <jacob.e.keller at intel.com> 
> Sent: Tuesday, August 25, 2026 3:54 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>; Kubalewski, Arkadiusz <arkadiusz.kubalewski at intel.com>; Loktionov, Aleksandr <aleksandr.loktionov at intel.com>; Korba, Przemyslaw <przemyslaw.korba at intel.com>; Machnikowski, Maciej <maciej.machnikowski at intel.com>
> Subject: [PATCH iwl-net v2 06/14] ice: call PTP link change only from link events
> 
> From: Arkadiusz Kubalewski <arkadiusz.kubalewski at intel.com>
> 
> Remove redundant ice_ptp_link_change() calls from ice_up_complete() and ice_down(). These duplicate the call already made from ice_handle_link_event(), creating three problems:
> 
> 1. Double initialization on link-up: ice_handle_link_event() calls
>    ice_ptp_link_change(true), then ice_up_complete() calls it again.
>    The second call re-enters ice_ptp_port_phy_restart(), re-setting the
>    calibrating flag and restarting the PHY timer while the first
>    invocation's offset verification work (ov_work) may still be running.
> 
> 2. Premature cleanup on administrative down: ice_down() calls
>    ice_ptp_link_change(false) during ifconfig down or reset preparation,
>    even when the physical link is still up. This clears timestamp state
>    unnecessarily and can interfere with ongoing PTP operations.
> 
> 3. Ordering dependency: ice_down()/ice_up_complete() are called during
>    reset sequences where PTP may not be fully initialized, creating
>    edge cases with partially configured state.
> 
> The link event handler is the correct and sufficient place to drive PTP link state changes, as it reflects actual physical link transitions. Remove the calls of ice_ptp_link_change from the ice_down()/ice_up() flows.
> 
> Initialize the link_up in ice_ptp_init() and ensure that we check and restore the link status at the end of the rebuild flow, ensuring that we initialize the PHY timer appropriately after a reset.
> 
> Fixes: 6b1ff5d39228 ("ice: always call ice_ptp_link_change and make it void")
> 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>
> Signed-off-by: Petr Oros <poros at redhat.com>
> Reviewed-by: Maciek Machnikowski <maciej.machnikowski at intel.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_main.c | 10 ++++++--  drivers/net/ethernet/intel/ice/ice_ptp.c  | 38 +++++++++++++++++++++++--------
>  2 files changed, 36 insertions(+), 12 deletions(-)

Tested-by: Alexander Nowlin <alexander.nowlin at intel.com>


More information about the Intel-wired-lan mailing list