> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of 
> [email protected]
> Sent: Tuesday, August 4, 2026 11:51 PM
> To: [email protected]; [email protected]
> Cc: [email protected]; Nguyen, Anthony L 
> <[email protected]>; Kitszel, Przemyslaw 
> <[email protected]>; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; Kwapulinski, Piotr <[email protected]>; 
> Kubalewski, Arkadiusz <[email protected]>; Loktionov, Aleksandr 
> <[email protected]>; [email protected]; Xuanqiang Luo 
> <[email protected]>
> Subject: [Intel-wired-lan] [PATCH iwl-net v2 2/5] i40e: serialize timestamp 
> configuration with PTP teardown
> 
> From: Xuanqiang Luo <[email protected]>
> 
> i40e_remove() can call i40e_ptp_stop() without the networking locks held.
> A concurrent hardware timestamp request can observe I40E_FLAG_PTP_ENA before 
> teardown clears it, then program PRTTSYN_CTL0 after teardown has disabled the 
> event source. This can leave time sync interrupts enabled during device 
> removal.
> 
> Add ptp_config_lock to serialize the enable check and register programming in 
> i40e_ptp_hwtstamp_set() with the PTP state transition in i40e_ptp_stop(). 
> Requests which observe PTP enabled finish programming before the state 
> transition; later requests return -EOPNOTSUPP and cannot re-enable the 
> interrupt.
> 
> Fixes: 1050713026a0 ("i40e: add support for PTP external synchronization 
> clock")
> Signed-off-by: Xuanqiang Luo <[email protected]>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h      |  2 ++
>  drivers/net/ethernet/intel/i40e/i40e_main.c |  1 +  
> drivers/net/ethernet/intel/i40e/i40e_ptp.c  | 17 +++++++++++++----
>  3 files changed, 16 insertions(+), 4 deletions(-)

Tested-by: Alexander Nowlin <[email protected]>

Reply via email to