From: Ahmad Byagowi <ahmadexp@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: netdev@vger.kernel.org, vadim.fedorenko@linux.dev,
richardcochran@gmail.com, andrew+netdev@lunn.ch,
arkadiusz.kubalewski@intel.com, davem@davemloft.net,
edumazet@kernel.org, jiri@resnulli.us, kuba@kernel.org,
linux-kernel@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net 2/4] ptp: ocp: use hardware selectors in DPLL frequency operations
Date: Sun, 22 Nov 2026 17:57:55 -0800 [thread overview]
Message-ID: <20261122-timecard-common-v4-e0db4ab1aa-r2-ahmadexp@gmail.com> (raw)
In-Reply-To: <179538006772.3135.15875996486888374193@kernel.org>
On Sun, 22 Nov 2026 at 20:41:07 +0000, netdev-bot+sashiko@kernel.org wrote:
> Does this still return -EINVAL for an enabled input that has more than
> one destination?
>
> The commit message says that without the mask "an enabled,
> direction-configurable pin has no matching table entry and its DPLL get
> or dump fails". The sysfs ABI allows several input destinations, and
> sma_parse_inputs() ORs them into one selector:
>
> sma_parse_inputs() {
> ...
> ret |= ptp_ocp_select_val_from_name(tbl[dir], argv[idx]);
>
> For example, writing "IN: TS1 TS2" to smaN gives 0x000C. After
> ptp_ocp_sma_store_val() adds SMA_ENABLE, 0x800C is written to the GPIO
> map.
Yes. I reproduced the error against the previous candidate. Masking the
enable bit alone did not fix combined destinations, and the DPLL core's
get-before-set path could still prevent recovery.
The v4 getter handles input combinations after the exact-match
lookup. Frequency-bearing destinations must agree to produce a known
frequency. Timestamp/counter destinations do not constrain it. A route
with no known frequency, conflicting frequencies or unknown bits returns
zero, as an individual timestamp route already does. This is a routing
interpretation, not a measurement of the input signal. Output selectors
still require an exact match.
The source-derived tests cover 4,669 masks across FB, ADVA and ADVA X1,
including TS1|TS2, timestamp-plus-PPS, conflicting destinations and
unknown bits. Recovery exercises the actual DPLL core get-before-set
function. The previous getter and a variant that chooses the first
conflicting frequency both fail runtime assertions.
> The commit message says passing the index can "fail on ART". Can a
> 10 MHz request on an ART input reach this line?
>
> The ART input table lists the 10Mhz entry at 1 MHz:
>
> static const struct ocp_selector ptp_ocp_art_sma_in[] = {
> ...
> { .name = "10Mhz", .value = 0x0008, .frequency = 1000000 },
>
> ART pins advertise ptp_ocp_sma_freq (1PPS, 10MHz, IRIG-B, DCF77). So
> dpll_pin_freq_set() accepts 10000000 and rejects 1000000.
Agreed. The selector fix was necessary but did not fix that separate
table error. I removed the misleading implication from patch 2 and
added a separate patch 5 changing the ART input frequency to 10000000.
The tests use the actual ART init/set/get functions and DPLL core
validation: 10000000 succeeds, 1000000 is rejected, and the fixed 0x08
default reads as 10000000. The old source fails those assertions.
Both issues are addressed in the v4 draft. Patch 2's expanded
behavior needs fresh review, so its earlier Reviewed-by is not retained.
All testing here is software-only with stubbed hardware operations.
The five-patch v4 series is posted separately to net:
https://lore.kernel.org/r/20261122-timecard-common-v4-e0db4ab1aa-0-ahmadexp@gmail.com
Ahmad
pw-bot: cr
next prev parent reply other threads:[~2026-11-23 1:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 20:05 [PATCH net 0/4] ptp: ocp: fix timestamp teardown and DPLL routing Ahmad Byagowi
2026-11-18 20:05 ` [PATCH net 1/4] ptp: ocp: prevent timestamp rearming during detach Ahmad Byagowi
2026-11-19 18:24 ` Vadim Fedorenko
2026-11-19 21:19 ` Ahmad Byagowi
2026-11-22 20:41 ` netdev-bot+sashiko
2026-11-23 1:58 ` Ahmad Byagowi
2026-11-18 20:05 ` [PATCH net 2/4] ptp: ocp: use hardware selectors in DPLL frequency operations Ahmad Byagowi
2026-11-22 20:41 ` netdev-bot+sashiko
2026-11-23 1:57 ` Ahmad Byagowi [this message]
2026-11-18 20:05 ` [PATCH net 3/4] ptp: ocp: report disabled SMA inputs consistently over DPLL Ahmad Byagowi
2026-11-22 20:41 ` netdev-bot+sashiko
2026-11-23 1:57 ` Ahmad Byagowi
2026-11-18 20:05 ` [PATCH net 4/4] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-22 20:41 ` netdev-bot+sashiko
2026-11-23 1:58 ` 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=20261122-timecard-common-v4-e0db4ab1aa-r2-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=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--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
all inboxes | Powered by JetHome®