From: netdev-bot+sashiko@kernel.org
To: ahmadexp@gmail.com
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,
pabeni@redhat.com
Subject: Re: [PATCH net v2 4/4] ptp: ocp: correct the DCF output frequency
Date: Mon, 23 Nov 2026 21:49:51 +0000 [thread overview]
Message-ID: <179547059147.3135.16821426799248727782@kernel.org> (raw)
In-Reply-To: <20261119-timecard-common-v2-078fe69f33-4-ahmadexp@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] This patch fixes one bad frequency in a selector table, but an
identical bug from the same Fixes commit (09eeb3aecc6c) is left in…
- [Low] The commit message describes testing and process for changes this
patch does not contain.
--
ptp: ocp: correct the DCF output frequency
This commit changes the DCF entry in the ptp_ocp_sma_out selector table
from 77000 Hz to 77500 Hz. That makes it match the input table and the
advertised DPLL_PIN_FREQUENCY_DCF77 value.
Link: https://lore.kernel.org/r/179502617840.3136.12704245716223038161@kernel.org
> Reported by the netdev Sashiko AI review and confirmed by code
> inspection. Source-derived C regression tests pass with ASan/UBSan;
> restoring the faulty selector, mask, disabled-state or DCF value makes
> the corresponding regression fail. Tests use stubbed MMIO, not hardware.
> The driver object builds on current net with W=1 and KCFLAGS=-Werror. No
> physical card was tested.
>
> Codex prepared the fix, tests and changelog from the review and upstream
> source, at the request to separate common-driver fixes from WiWi support
> and validate removal ordering.
[Severity: Low]
This isn't a bug, but do these paragraphs describe this commit?
The diff only changes the DCF .frequency value in ptp_ocp_sma_out. The
selector, mask, disabled-state and removal ordering work mentioned here
is not part of this patch. Someone reading this commit by itself, such
as a stable backporter, will see validation claims for code it does not
touch.
Could the series-level testing notes and the description of tool
assistance go in the cover letter or below the '---' separator instead?
The "Reported by the netdev Sashiko AI review" sentence could also become
a proper tag, or be dropped since the Link: tag is already there.
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index 06d05fac6e1c2..0d3d9ffd1f9b9 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -1375,7 +1375,7 @@ static const struct ocp_selector ptp_ocp_sma_out[] = {
> { .name = "GNSS1", .value = 0x0004, .frequency = 1 },
> { .name = "GNSS2", .value = 0x0008, .frequency = 1 },
> { .name = "IRIG", .value = 0x0010, .frequency = 10000 },
> - { .name = "DCF", .value = 0x0020, .frequency = 77000 },
> + { .name = "DCF", .value = 0x0020, .frequency = 77500 },
[Severity: Medium]
Should the "10Mhz" entry in ptp_ocp_art_sma_in be fixed the same way?
It comes from the same commit, 09eeb3aecc6c, and looks like the same
kind of typo:
drivers/ptp/ptp_ocp.c:
static const struct ocp_selector ptp_ocp_art_sma_in[] = {
{ .name = "PPS1", .value = 0x0001, .frequency = 1 },
{ .name = "10Mhz", .value = 0x0008, .frequency = 1000000 },
{ }
};
That value is 1 MHz. The matching "10Mhz" entry in ptp_ocp_art_sma_out
uses 10000000, and ptp_ocp_art_sma_init() labels 0x08 as the 10 MHz
input:
bp->sma[0].default_fcn = 0x08; /* IN: 10Mhz */
The ART pins advertise ptp_ocp_sma_freq. That list has
DPLL_PIN_FREQUENCY_10MHZ and no 1 MHz entry.
This produces the same two symptoms the commit message describes for
DCF.
On read, ptp_ocp_dpll_frequency_get()->ptp_ocp_art_sma_get() returns
0x08 for sma[0] in its default mode. The driver then reports 1000000 Hz,
which is outside the advertised set.
On write, take a non-fixed ART pin. A request for the advertised
10000000 Hz passes dpll_pin_is_freq_supported() in the DPLL core. The
exact match in ptp_ocp_dpll_frequency_set() then finds no entry:
if (tbl[i].frequency == frequency)
so the request fails with -EINVAL. The core rejects a 1 MHz request, so
the ART 10 MHz input cannot be selected through the DPLL frequency
interface at all.
Could this be fixed in this patch, or in a companion patch with the
same Fixes: tag?
> { .name = "GEN1", .value = 0x0040 },
> { .name = "GEN2", .value = 0x0080 },
> { .name = "GEN3", .value = 0x0100 },
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261119-timecard-common-v2-078fe69f33-0-ahmadexp%40gmail.com
next prev parent reply other threads:[~2026-11-23 21:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 21:19 [PATCH net v2 0/4] ptp: ocp: fix timestamp teardown and DPLL routing Ahmad Byagowi
2026-11-19 21:19 ` [PATCH net v2 1/4] ptp: ocp: prevent timestamp rearming during detach Ahmad Byagowi
2026-11-19 22:23 ` Vadim Fedorenko
2026-11-19 23:46 ` Ahmad Byagowi
2026-11-20 19:31 ` Vadim Fedorenko
2026-11-20 21:21 ` Ahmad Byagowi
2026-11-19 21:19 ` [PATCH net v2 2/4] ptp: ocp: use hardware selectors in DPLL frequency operations Ahmad Byagowi
2026-11-19 22:23 ` Vadim Fedorenko
2026-11-23 21:49 ` netdev-bot+sashiko
2026-11-23 21:58 ` Ahmad Byagowi
2026-11-19 21:19 ` [PATCH net v2 3/4] ptp: ocp: report disabled SMA inputs consistently over DPLL Ahmad Byagowi
2026-11-19 22:24 ` Vadim Fedorenko
2026-11-19 21:19 ` [PATCH net v2 4/4] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-19 22:24 ` Vadim Fedorenko
2026-11-23 21:49 ` netdev-bot+sashiko [this message]
2026-11-23 21:58 ` Ahmad Byagowi
2026-11-23 22:07 ` [PATCH net v2 0/4] ptp: ocp: fix timestamp teardown and DPLL routing 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=179547059147.3135.16821426799248727782@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=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=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