Skip to content

igc/igb: Fix missing time sync events

Vinicius Costa Gomes intel-wired-lan lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Reworded cover letter and commit messages, so it's clear that the issue is when the same kind of event happens "twice" it might be ignored (Richard Cochran);

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2igc: Fix missing time sync eventsdrivers/net/ethernet/intel/igc/igc_main.c+1 -111 reply
2/2igb: Fix missing time sync eventsdrivers/net/ethernet/intel/igb/igb_main.c+5 -181 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKurt KanzenbachRichard CochranPucha Himasekhar ReddyNaama Meir
1/2R-b T-b T-b
2/2A-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [iwl-net v2 0/2] igc/igb: Fix missing time sync events

Hi,

Changes from v1:
- Reworded cover letter and commit messages, so it's clear that the issue is when the same kind of event happens "twice" it might be ignored (Richard Cochran);

Link to v1:
https://lore.kernel.org/all/[email protected]/

It was reported that i225/i226 could sometimes miss some time sync events when two or more types of events (PPS and Timestamps were used by the reporter) are being used at the same time under heavy traffic.

The core issue is that the driver was double clearing interrupts, as the register is both "read to clear" and "write 1 to clear" (documented in section 8.16.1 of the datasheet), and the handler was doing both. Which could cause events to be missed if the same kind of event that triggered the handler happens again between the "read" and the "write".

Removing the write fixes the issue.

It was tracked down to commit 2c344ae24501 ("igc: Add support for TX timestamping"), in which I added support for basic timestamp operations, the issue is that as the hardware operates very similarly to i210, I used igb code as inspiration. And indeed, the same double clearing is present there.

But in the igb case, I haven't seen myself or heard about any issues that seem related to this. So I think it's more like a possible issue. But it seems like a good idea to fix it there was well.

Vinicius Costa Gomes (2):
igc: Fix missing time sync events
igb: Fix missing time sync events

 drivers/net/ethernet/intel/igb/igb_main.c | 23 +++++------------------
 drivers/net/ethernet/intel/igc/igc_main.c | 12 +-----------
 2 files changed, 6 insertions(+), 29 deletions(-)
Signature · 1 line
2.43.2