From: netdev-bot+sashiko@kernel.org
To: ahmadexp@gmail.com
Cc: netdev@vger.kernel.org, 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: Re: [PATCH net v5 8/8] ptp: ocp: correct the ART 10 MHz input frequency
Date: Wed, 25 Nov 2026 04:44:48 +0000 [thread overview]
Message-ID: <179558188819.3135.13063151808595339248@kernel.org> (raw)
In-Reply-To: <20261123-timecard-common-v5-d669cfa034-8-ahmadexp@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
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] The patch fixes only the 10 MHz case.
--
ptp: ocp: correct the ART 10 MHz input frequency
This commit changes the frequency of the ART input selector named 10Mhz
from 1000000 Hz to 10000000 Hz. That makes it match the 10 MHz value that
ART pins advertise and the matching ART output entry, so DPLL frequency
set requests for 10 MHz no longer fail with -EINVAL.
Link: https://lore.kernel.org/r/179538006772.3135.15875996486888374193@kernel.org
Link: https://lore.kernel.org/r/179538007070.3135.8275620503580456948@kernel.org
> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index 821ecd1a13c8e..93923d5a29922 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 },
> { }
> };
[Severity: Medium]
The table change looks correct. Is the failure described in the commit
message still reachable on ART pins for two other advertised frequencies?
ptp_ocp_art_sma_init() registers every ART SMA pin with the shared
generic list:
drivers/ptp/ptp_ocp.c:ptp_ocp_art_sma_init() {
...
.freq_supported_num = ARRAY_SIZE(ptp_ocp_sma_freq),
.freq_supported = ptp_ocp_sma_freq,
...
}
That list also advertises IRIG-B (10000 Hz) and DCF77 (77500 Hz):
static struct dpll_pin_frequency ptp_ocp_sma_freq[] = {
DPLL_PIN_FREQUENCY_1PPS,
DPLL_PIN_FREQUENCY_10MHZ,
DPLL_PIN_FREQUENCY_IRIG_B,
DPLL_PIN_FREQUENCY_DCF77,
};
Neither ptp_ocp_art_sma_in[] nor ptp_ocp_art_sma_out[] has an entry for
10000 or 77500 Hz:
static const struct ocp_selector ptp_ocp_art_sma_out[] = {
{ .name = "PHC", .value = 0x0002, .frequency = 1 },
{ .name = "GNSS", .value = 0x0004, .frequency = 1 },
{ .name = "10Mhz", .value = 0x0010, .frequency = 10000000 },
{ }
};
dpll_pin_freq_set() in drivers/dpll/dpll_netlink.c validates a request
only against the advertised list through dpll_pin_is_freq_supported().
That means DPLL_CMD_PIN_SET with DPLL_A_PIN_FREQUENCY set to 10000 or
77500 on a non-fixed_fcn ART pin passes the core check.
The request then reaches ptp_ocp_dpll_frequency_set(), where it finds no
match and returns -EINVAL:
tbl = bp->sma_op->tbl[sma->mode];
for (i = 0; tbl[i].name; i++)
if (tbl[i].frequency == frequency)
return ptp_ocp_sma_store_val(bp, tbl[i].value,
sma->mode, sma_nr + 1);
return -EINVAL;
Pin-get also keeps reporting IRIG-B and DCF77 for every ART pin, even
though the ART hardware has no selector for them.
Would it make sense to give ART pins their own freq_supported list that
contains only DPLL_PIN_FREQUENCY_1PPS and DPLL_PIN_FREQUENCY_10MHZ, either
in this patch or in a follow-up?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261123-timecard-common-v5-d669cfa034-0-ahmadexp%40gmail.com
prev parent reply other threads:[~2026-11-25 4:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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-25 4:44 ` netdev-bot+sashiko
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-25 4:44 ` netdev-bot+sashiko
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
2026-11-25 4:44 ` netdev-bot+sashiko [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=179558188819.3135.13063151808595339248@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=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
all inboxes | Powered by JetHome®