Article View: linux.kernel.netdev
Article #21336Re: [PATCH net v2 4/4] ptp: ocp: correct the DCF output frequency
From: netdev-bot+sashiko
Date: Mon, 23 Nov 2026 21:49
Date: Mon, 23 Nov 2026 21:49
111 lines
12378 bytes
12378 bytes
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
Technical Details
Message-ID:
<179547059147.3135.16821426799248727782@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369796-linux-kernel-netdev=dewy.ruReferences:
<20261119-timecard-common-v2-078fe69f33-4-ahmadexp@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-369796-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 4/4] ptp: ocp: correct the DCF output frequency Date: Mon, 23 Nov 2026 21:49:51 +0000 Organization: Usenet Network Message-ID: <179547059147.3135.16821426799248727782@kernel.org> References: <20261119-timecard-common-v2-078fe69f33-4-ahmadexp@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3992674"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:W1kxN2oW63aHi3AiENni+f7KgDg= sha256:tAmw8ZGj4M3uKRKd8eWrhIGoOH9Q5UjoN33B1AeWLog= sha1:YLW0nVYDw5YwPRBsmYWrPhjWcPQ= sha256:i5DCRoGFI0zD00LmoTlhz1WXjiBO0IXTtuKIHuFzQk0= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 0A532125DB9; Tue, 24 Nov 2026 00:50:08 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qjl3elvOrt0i; Tue, 24 Nov 2026 00:50:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369796-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 3DDD6125DC7; Tue, 24 Nov 2026 00:49:54 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id BBD47303B7; Mon, 23 Nov 2026 21:49:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795470593; b=g6J1OgUUPpbxgkrtqzeFa2H2mIOxt6WVk3HYHxl8KxLc2q9qidaYU4MSb4EEHNSsIpRo 7hA+SF5q8suTAb4jEXN07anBWMCdsczCSgz1gCFQDhWKlPhz9dbX0l7C2Xb8CBHvsNbrn 3FjrXbll3CYizaoucRevUPAMneYU2cD393aYLKk/rSFkdcrwvfrjMJMT1GqwLZjChJujh Gq23JYOxPiRniIMuBVsxtt4gP/CaUdff//tvxxyS54ybLqCpg6ubG3Dq/YhsGqpV0D4Sg LKgNdv2p000BqGjwWB6HPrsOL1XdNl2ImS9oy34lyhRKIUSZT+IcYzf3ZP7858u/FOw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795470593; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=sYRYIL1mQmbaPAJGWZh55nDTxWggSeU7XYU4jCKtyxU=; b=l3OpDjQeEVYAf9beMXF3P+jCF/a6H6ntK/YglkWlMG/8WRAU26FM6qjLsnd8ckVpw1Od 0zHhoaRLbjr/jGA1Noei2kZjWCOWRjoYPawWM7yKBztmpEjFQePtRScpCCvy7I1zWdqnp ZAeVV6K8OxN0Wp0EXm1WooUEhaaJ3q/nN25Ld6p2gqFAI/3OCU+kF3r086lSifaAm/9o/ sb0I0e2g1BGzFyUHfE9e9QcQN+B4wD+SxDZ62NKxZSVv8pfIGAkHhcmbyijanj18LZbIj 5DyfLpBexEdXx9PKjFUt0ZIPn/+L1nxNh4XOSYucI3yYWHLHL8G1ihdERmzzb0CpBdw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J13A9DoA; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81ECD606A31E; Mon, 23 Nov 2026 21:49:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J13A9DoA X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795470592; b=XedA/hqms/LPEQ+0a1xqUgSGMVrSC76j88qS2VOXaRlrQH2eX/Hj8ZpnsZaNzQCc//Pr IpgmYgwUXuk8eTQzcIfkbpG06IyHAlE/9Lc/qF659boaSWJ8nNUhSYvj+kQzD3mP2ZDif nEtwChaBkX9RzvP/EaxSKwqAv6bjr5tIpksJa7pbYRn3GGVuIf+kkPLzQcaTDHEQuD7Pj lLH3oDpm/JOj68ErNiZBKFHKghlqYOK31KInfQBP0mgAaIdgwHVC+IJOD6Z2gMmV/nu81 WMOt+NT3c7FL/e+ljP6zUV1Q82dA/sTjkPNIPO1bJp2lpjE6yp+iDh8rWttDM/ploSw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795470592; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=sYRYIL1mQmbaPAJGWZh55nDTxWggSeU7XYU4jCKtyxU=; b=tlyyMsrBHmGX5mVd3woHG/JnXixDU+l6ClX9zZQUJA8xNBoB6LyTDEIl9NQqFfs2VX9n Mkt5NNryChApIp7G++eGGfP9O7OwOuYFimEiKsu7I4SyWzioUbillUifULgxS9n4nXGC8 quS7642j+0yPqOJiZSEk2NMTz4Z6KFZEm9RHafw2TrUVfB0h2voCuX+HBcRPYykTA9+te WGPOAxfYbrifFJqT7sy2VBnr4rekONeYoSqVN6r2xA82LvLKdLrBiy5E7n15fW7kfgMdQ umvtG9e4VBKSGHn6Zz8Jh+2Qi8hUJFdeHWeSd19mfRlgs4ATNt/Pm8TDG3tBhPMoLog== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=J13A9DoA; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2AC4606A338 for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 21:49:52 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E12991F000EB; Mon, 23 Nov 2026 21:49:51 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795470592; bh=sYRYIL1mQmbaPAJGWZh55nDTxWggSeU7XYU4jCKtyxU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=J13A9DoAvDa1hnzRG0y0kjPpJa5ZX1g5WP/oKD/RZ3ypyQEHueDvrGy+HSDTjAPVg jms3KNTbUU7OdveYnfI8pyHyikdnJ7cKqyOVbY3444+yHfGcV/IGt8M9sQwrOjTWlQ 6/GpUac/BR8eVCTW7AdoBOQ3HRhUJJkbIT2aEV1/iEph939/XLHfRW+el8oQkjI+eT g2ZtrOQTjW/cxlgSgJ/0F4hyN26srecccNuR7OUwQD9OTOnNZBjX/YiESxFAk9HJt3 OuZterE2Zxt6nlK6mJIoSO7QgmlikQAbk+rOJJUAxj5p11k3dJEQ7tTWbVtlaFH+jc pQyi2LMUxhdeQ== X-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 X-In-Reply-To: <20261119-timecard-common-v2-078fe69f33-4-ahmadexp@gmail.com> X-sashiko-severity: Medium X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list