From: Ahmad Byagowi <ahmadexp@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew@lunn.ch, arkadiusz.kubalewski@intel.com, arnd@arndb.de,
davem@davemloft.net, edumazet@kernel.org, jiri@resnulli.us,
john.stultz@linaro.org, jonathan.lemon@gmail.com,
kuba@kernel.org, linux-kernel@vger.kernel.org, olteanv@gmail.com,
pabeni@redhat.com, richardcochran@gmail.com,
rmk+kernel@armlinux.org.uk, vadim.fedorenko@linux.dev
Subject: [PATCH net v5 0/8] ptp: fix request serialization, teardown and SMA reporting
Date: Mon, 23 Nov 2026 20:42:33 -0800 [thread overview]
Message-ID: <20261123-timecard-common-v5-d669cfa034-0-ahmadexp@gmail.com> (raw)
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
next reply other threads:[~2026-11-24 4:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 4:42 Ahmad Byagowi [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123-timecard-common-v5-d669cfa034-0-ahmadexp@gmail.com \
--to=ahmadexp@gmail.com \
--cc=andrew@lunn.ch \
--cc=arkadiusz.kubalewski@intel.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jiri@resnulli.us \
--cc=john.stultz@linaro.org \
--cc=jonathan.lemon@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox