[PATCH net v2 0/4] ptp: ocp: fix timestamp teardown and DPLL routing

From
Ahmad Byagowi <hidden>
Date
2026-11-19 21:19:49
These fixes address existing Time Card teardown and routing issues and
are independent of the WiWi board support series.

Changes since v1:
- Patch 1 uses the existing device spinlock instead of a new mutex, as
  suggested by Vadim Fedorenko. It covers the stopping check, PPS map
  changes and MMIO, but releases the lock before pci_irq_vector() and
  synchronize_irq(). The vector lookup takes the MSI descriptor mutex.
- During teardown, the PPS no-state-change shortcut is bypassed so a
  concurrent disable which has cleared the map cannot cause detach to
  skip its own IRQ drain.
- The source-derived removal harness now checks that MMIO remains locked,
  vector lookup and IRQ synchronization are unlocked, and an in-flight
  disable cannot skip teardown synchronization. Six intentional
  regressions are rejected.
- Code changes in patches 2-4 are unchanged. Group Fixes, Link and
  Signed-off-by trailers without intervening blank lines, addressing
  the v1 verify_fixes CI finding.

The common and WiWi-integration PTP objects compile for x86-64 with W=1
and KCFLAGS=-Werror. Source-derived ASan/UBSan removal and routing checks
pass. The old-source control still reproduces rearming. These are mocked
MMIO/IRQ interleaving tests, not kernel lockdep, KASAN or physical unbind
tests. No production machine, card firmware or Windows HLK host was used.

The issues were reported in the netdev Sashiko AI review and checked
against the upstream source. Codex prepared the code, changelogs and
software tests at the request to separate common fixes from WiWi support;
this revision checks Vadim's spinlock suggestion and extends the removal
tests. The patch changelogs describe the discovery and testing details.

Previous series:
https://lore.kernel.org/r/20261118-timecard-common-301f823ddd-0-ahmadexp@gmail.com (local)
Review:
https://lore.kernel.org/r/ad6883e5-c103-4f82-8040-e5463477ca10@linux.dev (local)

Base: 2a324a58a084c5cfd7e5a2f55e0786bee170a4a5 (same net base as v1).
WiWi v4 remains separate and unsent.

Ahmad Byagowi (4):
  ptp: ocp: prevent timestamp rearming during detach
  ptp: ocp: use hardware selectors in DPLL frequency operations
  ptp: ocp: report disabled SMA inputs consistently over DPLL
  ptp: ocp: correct the DCF output frequency

 drivers/ptp/ptp_ocp.c | 43 ++++++++++++++++++++++++++++++++++---------
 1 file changed, 34 insertions(+), 9 deletions(-)
Thread (11 messages) 11 messages, 2 authors, last reply 1h ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help