> -----Original Message----- > From: Keller, Jacob E <[email protected]> > Sent: Friday, August 21, 2026 5:13 PM > To: Intel Wired LAN <[email protected]> > Cc: [email protected]; Machnikowski, Maciej > <[email protected]>; Nguyen, Anthony L > <[email protected]>; Korba, Przemyslaw <[email protected]>; > Nitka, Grzegorz <[email protected]>; Oros, Petr <[email protected]>; > Nowlin, Alexander <[email protected]>; Bross, Kevin > <[email protected]>; Cavatur, Ranjit <[email protected]>; Keller, > Jacob E <[email protected]>; Kubalewski, Arkadiusz > <[email protected]>; Loktionov, Aleksandr > <[email protected]>; Korba, Przemyslaw > <[email protected]>; Machnikowski, > Maciej > <[email protected]> > Subject: [PATCH iwl-net 04/12] ice: call PTP link change only from link events > > From: Arkadiusz Kubalewski <[email protected]> > > 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 <[email protected]> > Signed-off-by: Arkadiusz Kubalewski <[email protected]> > Signed-off-by: Przemyslaw Korba <[email protected]> > Signed-off-by: Petr Oros <[email protected]> > Reviewed-by: Maciek Machnikowski <[email protected]> > --- > 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 <[email protected]>
