🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #20646

[PATCH net v4 5/5] ptp: ocp: correct the ART 10 MHz input frequency

#20646
From: Ahmad Byagowi
Date: Mon, 23 Nov 2026 01:57
46 lines
12941 bytes
The ART input selector named 10Mhz has a frequency of 1000000 Hz instead
of 10000000 Hz. ART pins advertise 10 MHz, not 1 MHz. A request for the
advertised value passes the DPLL core's supported-frequency check but
matches no input selector, so frequency_set returns -EINVAL. Reading
the default ART input selector 0x08 reports the unadvertised 1 MHz value.

Use 10000000 Hz for the ART input selector, matching the advertised
frequency and the corresponding ART output entry.

Tests using the actual ART accessors, stubbed registers and DPLL core
frequency validation reproduce both failures and pass with the fix
under ASan/UBSan. No physical ART card was tested.

The issue was reported by the Sashiko review. Codex assisted with the
table correction, actual-accessor regression tests and the changelog.

Fixes: 09eeb3aecc6c ("ptp_ocp: implement DPLL ops")
Link: https://lore.kernel.org/r/179538006772.3135.15875996486888374193@kernel.org
Link: https://lore.kernel.org/r/179538007070.3135.8275620503580456948@kernel.org
Signed-off-by: Ahmad Byagowi <ahmadexp@gmail.com>
---
New in v4, kept separate from the unchanged DCF correction.

Testing: actual ART init/set/get functions plus the actual DPLL core
frequency validation and get-before-set functions. A literal 10000000 Hz
request succeeds; 1000000 is rejected; the fixed 0x08 default reports
10000000. The old source and the one-MHz mutation fail runtime assertions.
The test uses stubbed registers, not an ART card.

 drivers/ptp/ptp_ocp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c
index 821ecd1a13c8..93923d5a2992 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 },
 	{ }
 };
 
Technical Details
Message-ID: <20261122-timecard-common-v4-e0db4ab1aa-5-ahmadexp@gmail.com>
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-368949-linux-kernel-netdev=dewy.ru
References: <20261122-timecard-common-v4-e0db4ab1aa-0-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-368949-linux-kernel-netdev=dewy.ru
From: ahmadexp@gmail.com (Ahmad Byagowi)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v4 5/5] ptp: ocp: correct the ART 10 MHz input frequency
Date: Sun, 22 Nov 2026 17:57:48 -0800
Organization: Usenet Network
Message-ID: <20261122-timecard-common-v4-e0db4ab1aa-5-ahmadexp@gmail.com>
References: <20261122-timecard-common-v4-e0db4ab1aa-0-ahmadexp@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3766965"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Bq5jm4bk7PcC2QRLD2mXVfJYi8s= sha256:X+4g4H0Z+5zpLlU2SxUurDfGUAkHCU3TZo7WzGKy+Vg=
	sha1:1Mzw24vLk1l0I/W3vgX2Msu0a/E= sha256:65kxAyMjIFwf1T3geWV/dGg/+UDftVmVCYalhMu07To=
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 7E760125D8D; Mon, 23 Nov 2026 04:58:07 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
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 POxZTx8UoU24;
	Mon, 23 Nov 2026 04:58: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-368949-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id EF6A6125D8B; Mon, 23 Nov 2026 04:57:55 +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 C60D927E5E; Mon, 23 Nov 2026 01:57: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=1795399073;
	b=bECYTsI8Zb7MG46pZgwslQ63301Yb2JSHH+tVmJo9rnWUQlV45s9fEbgUNsN8alNQwg/
	 FeUH1HypoiF2rrAI2QACQtryoQdMqy+/rIeNXKLcfESxcuKQ+4NmhXJPCC5832knkjm64
	 KwdMAI1fDK9oYsf4jos6KzKB9a3P2z2HG/+bVAM7hVR49pZ592VS7+UBtS7h62o/x/icX
	 N22uClpp5RAxYot8w1HnzJmcu9ESHo8vax0MFeGc1JeQ84RcMLo1FCzdh0tXz+7RxTwa6
	 yUXieAkEn1M8s/gasIWyY2Gfwl8TlN7QaPCn97j8O0NJKFGVEtbs9kc0vTzfwvTIHsg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795399073;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=wM7T3AJod4EBmTcKF7LzaZRbntzoK6ZSjCdw0P7V9/8=;
	b=u1PPHI9l0idWFZN2YdmlG/OnnZ23zLsaK9km+XxaxnG6t2PQJRbXn/77+Fyfib/d7+jg
	 MvYjprW2BkfjjA+/gPxxGVGKUAfHRFRyRbKPgz2buTDAbHygioRgsML7iBhEwyt7futgn
	 1NU6RSwkN1WmY4VA/1ce52CGa7B476LsrheXFRzVQCcdHQCgBBXI9WNQQsL/X5Vs+vTxf
	 llssKV4SGWwY6RLuQBgRB3OPyozH9vmuzqo4l3X0JU5t54IlXLe4NSzclYFVY9hoorC/d
	 z+ORfukuCOsrk+QV/UzBUbBbsitEWP2BLNC3e5rQFA5gH0J9dSifLK/8IL8MlC00jUw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=XAIBn9Nf;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	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 61B44606A330;
	Mon, 23 Nov 2026 01:57:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=XAIBn9Nf
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.174
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795399072;
	b=sYhWsvTePfEYzuJslp60nvV+telxq5GMvheKRJXIYpRO9SbGLlAUnd1N+UzrgJ7yHdAt
	 gWtfcAXsZrQioiwBOnQKE9vkFup3sbAYIVSq+SnVbiwNOnny7sFIkJkBDklZeQE5xTXiy
	 HpP2c2mNrMZZ4CzozVXOrUmCQGO5lt2N+fZgq1HXBST8/mrIzs8UtNC//c6eBz9FrHvEZ
	 CGY5VAdpDiVr6W6vXugvALB2kg171HBLjY7RcyPWAADcw6ncZsxX1wXUP4pSsC80Wn+dK
	 v3EpCVm0CeKLCqtZ83n7VmrYUVjHnTNv5MWL+cYFB4D7iFnBJafPpZ00Si0Yt5F2/cQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795399072;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=wM7T3AJod4EBmTcKF7LzaZRbntzoK6ZSjCdw0P7V9/8=;
	b=uFFblBiSIMAULmt4tdtgFDEu18i4hHRLj3OB0/SQk1j+rsTTxedXhaVdNNOO12Y4NZf4
	 MFmyVjeHtYtmqLDSsqdRfUtTRPlCJnAFqUI/XttdJ7fXl10uPmg03zddy4AGz/4Cx+ZqO
	 15+JAmIBQBoCE0eFZArrIcWlaPb+vuRvFjF9zH6RPY6KnmwuzKh14VaFUO09fYlmESkgx
	 BkFaYnBKcHMq4MKcO/ZhiW9TOKJPLNs3zeSJdsQ1sQwWJwZg2EmwcO8qe6JEouP7HoBCQ
	 gQG+zEcslKts56CwAx8/Zt24V5kP9XCQk0/w4CWLjNzKFVMZeF37WOtP5vKAOKheFOw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=XAIBn9Nf;
	arc=none smtp.remote-ip=74.125.82.174
X-Received: from mail-dy1-f174.google.com (mail-dy1-f174.google.com [74.125.82.174])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 335B0606A31A
	for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 01:57:52 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 335B0606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f174.google.com with SMTP id 5a478bee46e88-36a315ed211so3574542eec.0
        for <netdev@vger.kernel.org>; Sun, 22 Nov 2026 17:57:52 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1795399071; x=1796003871; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=wM7T3AJod4EBmTcKF7LzaZRbntzoK6ZSjCdw0P7V9/8=;
        b=XAIBn9NfPG5z1dR4weIWq+BXD0KqpxWIbswxq/foRuS+Enfu+1cNzuILKGZMpLcJAo
         kvme9Jgq1/1Yd6exe0rRKh5JR+zkn3Ehc1+TOPhVUEXKz3V8OLKch71AH0T43H1Wf1tT
         BT0eaDCfYnZky1pvSBnyUaC7ETuyUf0dplWICHIJZ31Kjp5ev76zbdrfMPnsCHGUueaC
         nsEoC5AvKThV9gcnMeKMzcoXD2jKQTy6Gvn4M0uX24Xup0BUiN/QQX6n6EY+P5Wlm092
         BeQAvIYOHEGOCWKLak2znSkHNl5MMUCMZ0Yhb5Y8+IQJ1IbL9kCuDlWkk3siiwoMSLa+
         Otmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1795399071; x=1796003871;
        h=content-transfer-encoding:mime-version:references:in-reply-to
         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
         :to:cc:subject:date:message-id:reply-to:content-type;
        bh=wM7T3AJod4EBmTcKF7LzaZRbntzoK6ZSjCdw0P7V9/8=;
        b=a+QwX6coW/frWQotkVIPT+ik284WEajiwwQbPLOFJ84H6O92zcU37eLkHXJIrNiLpG
         tKvN0ld1TfHPqoYrBIEeTMyAHZGHk+3UuFcspbtPjSBbDg3yq827PFhj+OlZ1qJswXf0
         g02vbivS/g5oWqLlLSCxEEO4dqHjjfKWrf5qWcytGvCzLefZX5rO296yjVI8tvR2OYu/
         XeGiosbpY9gt3hD/ZHuwNmQT777KGKVvGCI5JXsQXf83Tqwlz6o8DkEZqHjp2gCxot5y
         dWHVOSoQkKekSJaXilaC+KyG9w4LbOAdJm1P8i4HhjPbS9f3BW1QAHba/zxRArOk8rbQ
         YRtA==
X-Gm-Message-State: APuU4Z9Dw5emeIF9nYx8WP51TvWUWaV2up6k9GqAuAXMIKcUPs299tfG
	31ecU4rgHK+CDTqCMfwG+U3HwaZJY9rKte/TCTV6/DjUHZ0uHyqQw1YskiMgj2UY
X-Gm-Gg: AZFdTZeldNutq2LkSiiyHys1/l2QDM3/aAi+dUbc0J3RO/+iEWwkp7Ud4UA26JF+nly
	71ki6dbSX7TNQyYg+GH25spCd6BUaSvwrnQ8vIE4RA/b3pzN6YJFq2i3XOqkPtRSDKzVSBE9hlP
	78WTNyeSgiAQQchzQyc/Fmyx7UaW5h9Hg76XC/PbLbOLkTLbNX1V3Nt/NmT3shZ7Q2IRVrcS6pc
	mFZA4EEtxowePnTmBi6i9r3DSpoqYDJ3XHMygMunqmqXWUzDfbDCUdSvUSwGqXrRjk0FfHGpEDF
	2oEgv3EAJ4rxoYCRw1chbq/uACWjrUJsNilCRCk6ItK/GdHiogt1C4/bsmhqFoxn9JDhzxKb3Wj
	pDf8uB8sqX4Hbci7+ZUC3nQ2eab3qrrrARimXiS4a1o61WtkLWL9tmgTC34uEjygsaClPsIM/KE
	lZFMClTLO7Ge9GRXcbyfoY/LDjBWJRvCEakLYIpNL4HGuuiv2N9fO8wGotRmA8xSldSj06WwC3l
	Wznel4dmayNlZEr5ui8/FEKbVZTeNSct76wVIai8Q11e8dPFmhhdqhNlTq9kVaaNenq5cvzoU6G
	rooFTnlEdBH1ssjkjxzs6QyqcwJoo/5X5nolrzwMk/ujwnwKCccCm2hjt9V5sNyCjNdpDBwLN/Q
	qxs64vOlErfhPfH/sqWP54jVBQupuVKkVqa1fg8HdndIQnSZKSORplHF2k6cfUKCeetOYdcKy
X-Received: by 2002:a05:7301:b8c:b0:36a:2f6c:490e with SMTP id 5a478bee46e88-384b3986ef2mr12977042eec.6.1795399071276;
        Sun, 22 Nov 2026 17:57:51 -0800 (PST)
X-Received: from Mac.localdomain (198-27-228-154.fiber.dynamic.sonic.net. [198.27.228.154])
        by smtp.gmail.com with ESMTPSA id 5a478bee46e88-385672ce402sm28493736eec.16.2026.11.22.17.57.50
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Sun, 22 Nov 2026 17:57:50 -0800 (PST)
X-Cc: andrew+netdev@lunn.ch,
	arkadiusz.kubalewski@intel.com,
	davem@davemloft.net,
	edumazet@kernel.org,
	jiri@resnulli.us,
	kuba@kernel.org,
	pabeni@redhat.com,
	richardcochran@gmail.com,
	rmk+kernel@armlinux.org.uk,
	vadim.fedorenko@linux.dev,
	vladimir.oltean@nxp.com
X-In-Reply-To: <20261122-timecard-common-v4-e0db4ab1aa-0-ahmadexp@gmail.com>
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