netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v5 0/8] ptp: fix request serialization, teardown and SMA reporting
@ 2026-11-24  4:42 Ahmad Byagowi
  2026-11-24  4:42 ` [PATCH net v5 1/8] ptp: serialize sysfs requests with the ioctl paths Ahmad Byagowi
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Ahmad Byagowi @ 2026-11-24  4:42 UTC (permalink / raw)
  To: netdev
  Cc: andrew, arkadiusz.kubalewski, arnd, davem, edumazet, jiri,
	john.stultz, jonathan.lemon, kuba, linux-kernel, olteanv, pabeni,
	richardcochran, rmk+kernel, vadim.fedorenko

This series fixes PTP request serialization and timestamp shutdown, and
corrects OCP SMA/DPLL reporting. It is based on net at 4392bb809812.
It contains no WiWi board support or LED driver changes.

The first two patches address prerequisites identified in v4 review:
serialize all three sysfs enable callbacks with the ioctl paths, and
prevent SJA1105 EXTTS disable from switching its shared pin to input.
Patch 3 preserves Vadim's requested teardown design: after removing the
user interfaces, send direct disable requests for each advertised EXTTS
channel, followed by PPS. Do not use a pin-function helper for channel
indices, alter pin assignments, or add a driver stopping flag or spinlock.

The remaining patches handle hardware selector values and combined input
routes, recover disabled SMA state on bind, report disabled inputs as
zero Hz, and correct the DCF77 and ART 10 MHz frequencies. Rebind recovery
is now separate from DPLL reporting, with the earlier b2c4f0ac53f3 Fixes
tag, so kernels without DPLL support can receive that correction.

Changes since v4:
- New patch 1 takes pincfg_mux in extts_enable, pps_enable and period.
  All callback errors and existing permission checks are preserved.
- New patch 2 changes the SJA1105 pin function only on EXTTS enable.
- Patch 3 has unchanged code. Its message no longer presents the runtime
  sysfs/ioctl race as remaining after patch 1. It explains why an empty
  software subscription map is not proof of initially idle hardware.
- Old patch 3 becomes patches 5 and 6, with separate Fixes tags. Correct
  the incremental ADVA X1 description: patch 4 already makes its zero
  input selector return zero Hz rather than -EINVAL.
- Patches 4, 7 and 8 retain their v4 code and messages. Preserve Vadim's
  Reviewed-by on the unchanged DCF correction only.

Validation of this revision:
- Reproduced v4's shared-PPS runtime race and SJA1105 pin side effect with
  actual extracted functions, controlled scheduling and stubbed hardware.
- 100 removal/shared-PPS model runs; 100 runtime serialization runs, each
  with four controlled interleavings; 100 SJA1105 runs, each with 14
  chip/direction cases. All passed under ASan/UBSan.
- Eight local KUnit cases passed in x86_64 QEMU with KASAN, lockdep and
  DEBUG_ATOMIC_SLEEP. These exercise real PTP register/unregister and
  real sysfs stores with a test clock, not physical OCP/SJA1105 hardware.
- x86_64 and i386 allmodconfig and allyesconfig builds passed for the PTP
  subtree and SJA1105 PTP object with W=1 and KCFLAGS=-Werror.
- SMA/DPLL tests cover 4,669 input combinations, 243 retained-mux rebind
  states, ART accessors, disabled-input re-enable and X1 direction change.
- Twenty deliberately broken variants were rejected by runtime assertions.

The review fixtures are local validation material, not new upstream test
interfaces. No physical card or switch was tested for this revision.

The reports came from the public review thread. Codex assisted with the
code, regression tests and submission text; the commit messages identify
the reports and distinguish modeled tests from hardware observations.

Previous revision:
https://lore.kernel.org/r/20261122-timecard-common-v4-e0db4ab1aa-0-ahmadexp@gmail.com

Latest review reports:
https://lore.kernel.org/r/179548551283.3135.17206659598806657887@kernel.org
https://lore.kernel.org/r/179548551472.3135.11972018356692852897@kernel.org

Ahmad Byagowi (8):
  ptp: serialize sysfs requests with the ioctl paths
  net: dsa: sja1105: leave the pin function unchanged on EXTTS disable
  ptp: disable all timestamp channels after removing the user interfaces
  ptp: ocp: handle hardware selectors and combined DPLL input routes
  ptp: ocp: recover disabled SMA inputs when binding the driver
  ptp: ocp: report zero frequency for disabled SMA inputs
  ptp: ocp: correct the DCF output frequency
  ptp: ocp: correct the ART 10 MHz input frequency

 drivers/net/dsa/sja1105/sja1105_ptp.c |  8 ++--
 drivers/ptp/ptp_chardev.c             | 14 ++++---
 drivers/ptp/ptp_ocp.c                 | 58 ++++++++++++++++++---------
 drivers/ptp/ptp_sysfs.c               |  9 +++++
 4 files changed, 62 insertions(+), 27 deletions(-)


base-commit: 4392bb809812ac79449cd0cf1f5e00469ee102d1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-24  4:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24  4:42 [PATCH net v5 0/8] ptp: fix request serialization, teardown and SMA reporting Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 1/8] ptp: serialize sysfs requests with the ioctl paths Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 2/8] net: dsa: sja1105: leave the pin function unchanged on EXTTS disable Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 3/8] ptp: disable all timestamp channels after removing the user interfaces Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 4/8] ptp: ocp: handle hardware selectors and combined DPLL input routes Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 5/8] ptp: ocp: recover disabled SMA inputs when binding the driver Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 6/8] ptp: ocp: report zero frequency for disabled SMA inputs Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 7/8] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-24  4:42 ` [PATCH net v5 8/8] ptp: ocp: correct the ART 10 MHz input frequency Ahmad Byagowi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).