This is a note to let you know that I've just added the patch titled igb: Fix PPS input and output using 3rd and 4th SDP to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: igb-fix-pps-input-and-output-using-3rd-and-4th-sdp.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 207ce626add80ddd941f62fc2fe5d77586e0801b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar <mlichvar@xxxxxxxxxx> Date: Mon, 13 Feb 2023 10:58:22 -0800 Subject: igb: Fix PPS input and output using 3rd and 4th SDP From: Miroslav Lichvar <mlichvar@xxxxxxxxxx> commit 207ce626add80ddd941f62fc2fe5d77586e0801b upstream. Fix handling of the tsync interrupt to compare the pin number with IGB_N_SDP instead of IGB_N_EXTTS/IGB_N_PEROUT and fix the indexing to the perout array. Fixes: cf99c1dd7b77 ("igb: move PEROUT and EXTTS isr logic to separate functions") Reported-by: Matt Corallo <ntp-lists@xxxxxxxxxxxxxxx> Signed-off-by: Miroslav Lichvar <mlichvar@xxxxxxxxxx> Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx> Tested-by: Gurucharan G <gurucharanx.g@xxxxxxxxx> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx> Link: https://lore.kernel.org/r/20230213185822.3960072-1-anthony.l.nguyen@xxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/net/ethernet/intel/igb/igb_main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -6816,7 +6816,7 @@ static void igb_perout(struct igb_adapte struct timespec64 ts; u32 tsauxc; - if (pin < 0 || pin >= IGB_N_PEROUT) + if (pin < 0 || pin >= IGB_N_SDP) return; spin_lock(&adapter->tmreg_lock); @@ -6824,7 +6824,7 @@ static void igb_perout(struct igb_adapte if (hw->mac.type == e1000_82580 || hw->mac.type == e1000_i354 || hw->mac.type == e1000_i350) { - s64 ns = timespec64_to_ns(&adapter->perout[pin].period); + s64 ns = timespec64_to_ns(&adapter->perout[tsintr_tt].period); u32 systiml, systimh, level_mask, level, rem; u64 systim, now; @@ -6872,8 +6872,8 @@ static void igb_perout(struct igb_adapte ts.tv_nsec = (u32)systim; ts.tv_sec = ((u32)(systim >> 32)) & 0xFF; } else { - ts = timespec64_add(adapter->perout[pin].start, - adapter->perout[pin].period); + ts = timespec64_add(adapter->perout[tsintr_tt].start, + adapter->perout[tsintr_tt].period); } /* u32 conversion of tv_sec is safe until y2106 */ @@ -6882,7 +6882,7 @@ static void igb_perout(struct igb_adapte tsauxc = rd32(E1000_TSAUXC); tsauxc |= TSAUXC_EN_TT0; wr32(E1000_TSAUXC, tsauxc); - adapter->perout[pin].start = ts; + adapter->perout[tsintr_tt].start = ts; spin_unlock(&adapter->tmreg_lock); } @@ -6896,7 +6896,7 @@ static void igb_extts(struct igb_adapter struct ptp_clock_event event; struct timespec64 ts; - if (pin < 0 || pin >= IGB_N_EXTTS) + if (pin < 0 || pin >= IGB_N_SDP) return; if (hw->mac.type == e1000_82580 || Patches currently in stable-queue which might be from mlichvar@xxxxxxxxxx are queue-6.1/igb-fix-pps-input-and-output-using-3rd-and-4th-sdp.patch