> -----Original Message-----
> From: Runyu Xiao <[email protected]> 
> Sent: 17 September 2026 20:33
> To: Nguyen, Anthony L <[email protected]>
> Cc: [email protected]; Kitszel, Przemyslaw 
> <[email protected]>; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]; [email protected]; 
> [email protected]; [email protected]
> Subject: [PATCH net v2] igb: initialize PTP state before registering PHC
>
> igb_ptp_init() currently initializes the PTP lock, work items, timestamp 
> configuration, and timecounter after ptp_clock_register().
> The PHC is published by that call, so PTP callbacks and timestamp interrupts 
> can run before those objects are ready.
>
> Initialize the complete PTP state before registering the PHC. Skip the setup 
> when CONFIG_PTP_1588_CLOCK is disabled, since the PTP registration helper is 
> then a no-op. If PHC registration fails, cancel the work items queued by 
> igb_ptp_reset() or a timestamp interrupt before returning.
>
> Fixes: b888c510f7b3 ("igb: Avoid starting unnecessary workqueues")
> Cc: [email protected]
> Link: 
> https://lore.kernel.org/netdev/[email protected]/
> Assisted-by: LLM
> Signed-off-by: Runyu Xiao <[email protected]>
>
> ---
> v2:
> - Restore all PTP state initialization before PHC registration.
> - Skip PTP setup when CONFIG_PTP_1588_CLOCK is disabled.
> - Cancel both PTP work items when PHC registration fails.
> ---
> drivers/net/ethernet/intel/igb/igb_ptp.c | 31 +++++++++++++++---------
> 1 file changed, 19 insertions(+), 12 deletions(-)

Tested-by: Singh, Ayush1X < [email protected] > (A Contingent worker at 
Intel)

Reply via email to