From: Ahmad Byagowi <ahmadexp@gmail.com>
To: netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, arkadiusz.kubalewski@intel.com,
davem@davemloft.net, edumazet@kernel.org, jiri@resnulli.us,
kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com,
rmk+kernel@armlinux.org.uk, vadim.fedorenko@linux.dev,
vladimir.oltean@nxp.com
Subject: [PATCH net v4 5/5] ptp: ocp: correct the ART 10 MHz input frequency
Date: Sun, 22 Nov 2026 17:57:48 -0800 [thread overview]
Message-ID: <20261122-timecard-common-v4-e0db4ab1aa-5-ahmadexp@gmail.com> (raw)
In-Reply-To: <20261122-timecard-common-v4-e0db4ab1aa-0-ahmadexp@gmail.com>
The ART input selector named 10Mhz has a frequency of 1000000 Hz instead
of 10000000 Hz. ART pins advertise 10 MHz, not 1 MHz. A request for the
advertised value passes the DPLL core's supported-frequency check but
matches no input selector, so frequency_set returns -EINVAL. Reading
the default ART input selector 0x08 reports the unadvertised 1 MHz value.
Use 10000000 Hz for the ART input selector, matching the advertised
frequency and the corresponding ART output entry.
Tests using the actual ART accessors, stubbed registers and DPLL core
frequency validation reproduce both failures and pass with the fix
under ASan/UBSan. No physical ART card was tested.
The issue was reported by the Sashiko review. Codex assisted with the
table correction, actual-accessor regression tests and the changelog.
Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Link: https://lore.kernel.org/r/179538006772.3135.15875996486888374193@kernel.org
Link: https://lore.kernel.org/r/179538007070.3135.8275620503580456948@kernel.org
Signed-off-by: Ahmad Byagowi <ahmadexp@gmail.com>
---
New in v4, kept separate from the unchanged DCF correction.
Testing: actual ART init/set/get functions plus the actual DPLL core
frequency validation and get-before-set functions. A literal 10000000 Hz
request succeeds; 1000000 is rejected; the fixed 0x08 default reports
10000000. The old source and the one-MHz mutation fail runtime assertions.
The test uses stubbed registers, not an ART card.
drivers/ptp/ptp_ocp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 821ecd1a13c8..93923d5a2992 100644
--- a/drivers/ptp/ptp_ocp.c
+++ b/drivers/ptp/ptp_ocp.c
@@ -1385,7 +1385,7 @@ static const struct ocp_selector ptp_ocp_sma_out[] = {
static const struct ocp_selector ptp_ocp_art_sma_in[] = {
{ .name = "PPS1", .value = 0x0001, .frequency = 1 },
- { .name = "10Mhz", .value = 0x0008, .frequency = 1000000 },
+ { .name = "10Mhz", .value = 0x0008, .frequency = 10000000 },
{ }
};
prev parent reply other threads:[~2026-11-23 1:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 1:57 [PATCH net v4 0/5] Fix PTP teardown and Time Card DPLL operations Ahmad Byagowi
2026-11-23 1:57 ` [PATCH net v4 1/5] ptp: disable all timestamp channels after removing the user interfaces Ahmad Byagowi
2026-11-23 1:57 ` [PATCH net v4 2/5] ptp: ocp: handle hardware selectors and combined DPLL input routes Ahmad Byagowi
2026-11-23 1:57 ` [PATCH net v4 3/5] ptp: ocp: preserve disabled SMA inputs across driver rebind Ahmad Byagowi
2026-11-23 1:57 ` [PATCH net v4 4/5] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-23 1:57 ` Ahmad Byagowi [this message]
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=20261122-timecard-common-v4-e0db4ab1aa-5-ahmadexp@gmail.com \
--to=ahmadexp@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=vadim.fedorenko@linux.dev \
--cc=vladimir.oltean@nxp.com \
/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