mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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,
	linux-kernel@vger.kernel.org, pabeni@redhat.com
Subject: Re: [PATCH net 4/4] ptp: ocp: correct the DCF output frequency
Date: Sun, 22 Nov 2026 20:41:10 +0000	[thread overview]
Message-ID: <179538007070.3135.8275620503580456948@kernel.org> (raw)
In-Reply-To: <20261118-timecard-common-301f823ddd-4-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 one bad entry in a selector table from commit
  09eeb3aecc6c, the one named in its Fixes: tag.

--

ptp: ocp: correct the DCF output frequency

The patch changes the DCF entry in the ptp_ocp_sma_out[] selector table
from 77000 Hz to 77500 Hz. That brings it in line with the input table
and the DPLL supported frequency list, so the advertised DCF77 frequency
can be set and read back on an output pin.

Link: https://lore.kernel.org/r/179502617840.3136.12704245716223038161@kernel.org

> diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
> index 650047581fd41..aa950cae68f46 100644
> --- a/drivers/ptp/ptp_ocp.c
> +++ b/drivers/ptp/ptp_ocp.c
> @@ -1376,7 +1376,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 ART input table get the same kind of fix? Commit 09eeb3aecc6c,
the one in the Fixes: tag, also added this entry to ptp_ocp_art_sma_in[]:

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 },
	{ }
};

The entry is named "10Mhz" but has a frequency of 1 MHz. The "10Mhz"
entry in ptp_ocp_art_sma_out[] uses 10000000.

ptp_ocp_art_sma_init() registers the ART pins with ptp_ocp_sma_freq
as their supported list:

	.freq_supported_num = ARRAY_SIZE(ptp_ocp_sma_freq),
	.freq_supported = ptp_ocp_sma_freq,

That list contains DPLL_PIN_FREQUENCY_10MHZ but not 1 MHz.

This seems to give the same two symptoms the commit message describes
for DCF, but on ART input pins.

On set, a DPLL netlink request for 10000000 passes
dpll_pin_is_freq_supported() in the core. It then reaches the
exact-match loop in ptp_ocp_dpll_frequency_set():

	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;

Nothing in the table matches, so the call returns -EINVAL.

On get, ptp_ocp_dpll_frequency_get() reports 1000000 for an ART input
that selects 0x08. That value is not in the pin's advertised set. Fixed
pins hit this too, because sma[0].default_fcn is 0x08 ("IN: 10Mhz").

Would it make sense to change that entry to 10000000 in this patch, or
in a follow-up?

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261118-timecard-common-301f823ddd-0-ahmadexp%40gmail.com

      reply	other threads:[~2026-11-22 20:41 UTC|newest]

Thread overview: 11+ 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-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-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-18 20:05 ` [PATCH net 4/4] ptp: ocp: correct the DCF output frequency Ahmad Byagowi
2026-11-22 20:41   ` 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=179538007070.3135.8275620503580456948@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=linux-kernel@vger.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®