Skip to content

Fix PTP teardown and Time Card DPLL operations

Ahmad Byagowi netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 2 repliesIn review
  2. v34 patches 5 repliesSuperseded
  3. v24 patches 10 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches6 repliesSuperseded

Changes in v4 from the cover letter

- Follow Vadim's channel/pin distinction explicitly: send PTP_CLK_REQ_EXTTS disable requests for timestamp channels directly, without using ptp_disable_pinfunc(). Keep that helper for actual pin configuration. Preserve cleanup after user-interface removal, shared PPS handling, and final IRQ draining without a new driver lock.
- Handle combined input destinations in the DPLL frequency getter. Report a known frequency only when the frequency-bearing destinations agree; report zero for unconstrained, conflicting or unknown routes. Output selectors still require an exact match.
- Recover disconnected SMA state from mux enable bits at initialization. Neither buffer enabled is represented as IN: None, since hardware does not retain a direction for that state. Do not write the mux or change fixed-direction firmware behavior. Explain the ADVA X1 failure too.
- Add a separate fifth patch for the ART 10 MHz input table typo.
- Keep patch-specific explanations and brief validation statements in the changelogs; move detailed testing/revision notes below the separator. Keep the trailer blocks contiguous.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ptp: disable all timestamp channels after removing the user interfacesdrivers/ptp/ptp_chardev.c drivers/ptp/ptp_ocp.c+11 -201 reply
2/5ptp: ocp: handle hardware selectors and combined DPLL input routesdrivers/ptp/ptp_ocp.c+25 -20 replies
3/5ptp: ocp: preserve disabled SMA inputs across driver rebinddrivers/ptp/ptp_ocp.c+10 -01 reply
4/5ptp: ocp: correct the DCF output frequencydrivers/ptp/ptp_ocp.c+1 -10 replies
5/5ptp: ocp: correct the ART 10 MHz input frequencydrivers/ptp/ptp_ocp.c+1 -10 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchVadim Fedorenko
1/5
2/5
3/5
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net v4 0/5] Fix PTP teardown and Time Card DPLL operations

This series fixes timestamp teardown and existing ptp_ocp DPLL behavior. It contains no WiWi board support and targets net.

Changes since v3:
- Follow Vadim's channel/pin distinction explicitly: send PTP_CLK_REQ_EXTTS disable requests for timestamp channels directly, without using ptp_disable_pinfunc(). Keep that helper for actual pin configuration. Preserve cleanup after user-interface removal, shared PPS handling, and final IRQ draining without a new driver lock.
- Handle combined input destinations in the DPLL frequency getter. Report a known frequency only when the frequency-bearing destinations agree; report zero for unconstrained, conflicting or unknown routes. Output selectors still require an exact match.
- Recover disconnected SMA state from mux enable bits at initialization. Neither buffer enabled is represented as IN: None, since hardware does not retain a direction for that state. Do not write the mux or change fixed-direction firmware behavior. Explain the ADVA X1 failure too.
- Add a separate fifth patch for the ART 10 MHz input table typo.
- Keep patch-specific explanations and brief validation statements in the changelogs; move detailed testing/revision notes below the separator. Keep the trailer blocks contiguous.

Patch 4's DCF correction is unchanged and retains Vadim's Reviewed-by. Patches 2 and 3 changed substantially, so their earlier review tags are not carried forward. They need fresh review.

Validation:
- Reproduced combined-input, ART-frequency and rebind failures against the previous candidate using source-derived ASan/UBSan tests.
- Repeated teardown/shared-PPS tests 100 times; checked all six channels, unassigned/zero pins, concurrent requests and active IRQ draining.
- Tested 4,669 input masks and 243 four-connector rebind configurations, plus actual DPLL core get-before-set and supported-frequency checks.
- Rejected 16 deliberate regressions with runtime assertions.
- Built the PTP subtree for x86_64/i386, allmodconfig and allyesconfig, with W=1 KCFLAGS=-Werror.
- Ran five PTP cleanup KUnit cases using real core register/unregister in QEMU with KASAN and lockdep. No physical-card test is claimed.

This replaces the previous four-patch common-driver series. The separate WiWi support series will follow for net-next after these fixes are in.

Previous series:
https://lore.kernel.org/r/[email protected]
Review prompting the explicit timestamp requests:
https://lore.kernel.org/r/[email protected]
Additional DPLL, rebind and ART reports:
https://lore.kernel.org/r/[email protected]
https://lore.kernel.org/r/[email protected]
https://lore.kernel.org/r/[email protected]

As required by generated-content.rst, Codex assisted with the code, tests and changelogs in response to review. This does not replace personal DCO certification or hardware validation.

Ahmad Byagowi (5):
ptp: disable all timestamp channels after removing the user interfaces
ptp: ocp: handle hardware selectors and combined DPLL input routes
ptp: ocp: preserve disabled SMA inputs across driver rebind
ptp: ocp: correct the DCF output frequency
ptp: ocp: correct the ART 10 MHz input frequency

 drivers/ptp/ptp_chardev.c | 14 ++++++----
 drivers/ptp/ptp_ocp.c     | 58 ++++++++++++++++++++++++++-------------
 2 files changed, 48 insertions(+), 24 deletions(-)

base-commit: af6737b9066832a2017c281159950ba92385ce00