RE: [PATCH iwl-net 04/12] ice: call PTP link change only from link events
From: Nowlin, Alexander <hidden>
Date: 2026-08-22 04:15:34
Also in:
intel-wired-lan
-----Original Message-----
From: Keller, Jacob E <jacob.e.keller@intel.com>
Sent: Friday, August 21, 2026 5:13 PM
To: Intel Wired LAN <redacted>
Cc: netdev@vger.kernel.org; Machnikowski, Maciej <redacted>; Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Korba, Przemyslaw <redacted>; Nitka, Grzegorz <redacted>; Oros, Petr <redacted>; Nowlin, Alexander <redacted>; Bross, Kevin <redacted>; Cavatur, Ranjit <redacted>; Keller, Jacob E <jacob.e.keller@intel.com>; Kubalewski, Arkadiusz <arkadiusz.kubalewski@intel.com>; Loktionov, Aleksandr <redacted>; Korba, Przemyslaw <redacted>; Machnikowski, > Maciej <redacted>
Subject: [PATCH iwl-net 04/12] ice: call PTP link change only from link events
From: Arkadiusz Kubalewski <arkadiusz.kubalewski@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 <redacted>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: Przemyslaw Korba <redacted>
Signed-off-by: Petr Oros <redacted>
Reviewed-by: Maciek Machnikowski <redacted>
---
drivers/net/ethernet/intel/ice/ice_main.c | 11 +++++++-- drivers/net/ethernet/intel/ice/ice_ptp.c | 38 +++++++++++++++++++++++--------
2 files changed, 37 insertions(+), 12 deletions(-)Tested-by: Alexander Nowlin <redacted>