RE: [Intel-wired-lan] [iwl-net v2 2/2] igb: Fix missing time sync events

From: Pucha, HimasekharX Reddy
Date: Tue Feb 27 2024 - 07:05:02 EST


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of Vinicius Costa Gomes
> Sent: Wednesday, February 21, 2024 5:27 AM
> To: intel-wired-lan@xxxxxxxxxxxxxxxx
> Cc: Neftin, Sasha <sasha.neftin@xxxxxxxxx>; Gomes, Vinicius <vinicius.gomes@xxxxxxxxx>; netdev@xxxxxxxxxxxxxxx; richardcochran@xxxxxxxxx; kurt@xxxxxxxxxxxxx; Brandeburg, Jesse <jesse.brandeburg@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxx; Eric Dumazet <edumazet@xxxxxxxxxx>; Nguyen, Anthony L <anthonyl.nguyen@xxxxxxxxx>; Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [iwl-net v2 2/2] igb: Fix missing time sync events
>
> Fix "double" clearing of interrupts, which can cause external events
> or timestamps to be missed.
>
> The E1000_TSIRC Time Sync Interrupt Cause register can be cleared in two
> ways, by either reading it or by writing '1' into the specific cause
> bit. This is documented in section 8.16.1.
>
> The following flow was used:
> 1. read E1000_TSIRC into 'tsicr';
> 2. handle the interrupts present into 'tsirc' and mark them in 'ack';
> 3. write 'ack' into E1000_TSICR;
>
> As both (1) and (3) will clear the interrupt cause, if the same
> interrupt happens again between (1) and (3) it will be ignored,
> causing events to be missed.
>
> Remove the extra clear in (3).
>
> Fixes: 00c65578b47b ("igb: enable internal PPS for the i210")
> Acked-by: Richard Cochran <richardcochran@xxxxxxxxx>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 23 +++++------------------
> 1 file changed, 5 insertions(+), 18 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@xxxxxxxxx> (A Contingent worker at Intel)