Skip to content

igb: ptp hardware clock

Richard Cochran netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 13 repliesIn review
  2. v32 patches 7 repliesSuperseded
  3. v22 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC2 patches10 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2igb: add PTP Hardware Clock codedrivers/net/ethernet/intel/igb/igb.h drivers/net/ethernet/intel/igb/igb_ptp.c+337 -04 replies
2/2igb: offer a PTP Hardware Clock instead of the timecompare methoddrivers/net/ethernet/intel/igb/Makefile drivers/net/ethernet/intel/igb/igb.h drivers/net/ethernet/intel/igb/igb_main.c +1 more+70 -1700 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH net V4 0/2] igb: ptp hardware clock

* ChangeLog
** V4
- Use standard kernel cyclecounter/timecounter infrastructure instead of a home grown counter overflow implementation.
** V3
- Driver compiles even without CONFIG_PTP_1588_CLOCK.
- Timestamping always works, even when PTP code missing or fails.
** V2
- Fixed wrong bit shifting in the 82576 code.
- Explained the timestamp locking with a comment in the code.
- Preserved the comments from the original timecompare implementation.
- Added an additional test within the overflow counter code to fix a race condition. Details of the problem are given in the commit message.

This patch series implements a PHC driver for the Intel 82576 and 82580 devices, as part of the igb driver. Only the base clock operations are implemented. The hardware does have some ancillary features, but these can be easily added later.

The first patch adds the PHC driver code as a new source module but does not link it into the main igb driver. Because the system time counter is not so very wide, the code uses the overflow counter from the cyclecounter/timecounter code. Every read operation maintains the overflow counter, as does a "delayed work" watchdog.

The second patch removes the timecompare code and links in the new functions.

I have tested the 82580 with good results. However, I don't have the 82576 and so would appreciate testing and feedback.

Thanks,
Richard

Richard Cochran (2):
igb: add PTP Hardware Clock code
igb: offer a PTP Hardware Clock instead of the timecompare method

 drivers/net/ethernet/intel/igb/Makefile   |    2 +-
 drivers/net/ethernet/intel/igb/igb.h      |   20 ++-
 drivers/net/ethernet/intel/igb/igb_main.c |  167 +------------
 drivers/net/ethernet/intel/igb/igb_ptp.c  |  388 +++++++++++++++++++++++++++++
 4 files changed, 407 insertions(+), 170 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/igb/igb_ptp.c
Signature · 1 line
1.7.2.5