Article View: linux.kernel.netdev
Article #26108Re: [PATCH net-next v3 2/3] net: ethernet: ti: am65-cpts: wait after each event FIFO pop
From: netdev-bot+sashiko
Date: Thu, 03 Dec 2026 02:45
Date: Thu, 03 Dec 2026 02:45
73 lines
10966 bytes
10966 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] Commit "net: ethernet: ti: am65-cpts: wait after each event FIFO
pop" fixes a CPTS TRM timing violation that has been in the driver…
--
net: ethernet: ti: am65-cpts: wait after each event FIFO pop
This commit adds a register read-back and a 100 ns delay after each
EVENT_POP write in am65_cpts_fifo_pop_event(). The TRM says TS_PEND is
not valid until four CPTS_RFT_CLK periods plus four CPPI_ICLK periods
have passed after a pop, and the delay is there to meet that rule.
> The TRM's procedure for reading the CPTS event FIFO says that after a
> write to EVENT_POP, TS_PEND is not valid until four CPTS_RFT_CLK periods
> plus four CPPI_ICLK periods have passed. am65_cpts_fifo_pop_event() does
> not wait, so the next read of TS_PEND in __am65_cpts_fifo_read() can
> come before it is valid.
[ ... ]
> Signed-off-by: James Clark <jjc@jclark.com>
[Severity: Low]
Should this have a Fixes: tag? The EVENT_POP write with no wait after it
in am65_cpts_fifo_pop_event() has not changed since the driver was added:
Fixes: f6bd59526ca5 ("net: ethernet: ti: introduce am654 common platform time sync driver")
Could the commit message also say what goes wrong when TS_PEND is read
too early, and whether anyone has seen it happen?
__am65_cpts_fifo_read() calls am65_cpts_fifo_pop_event() back to back:
drivers/net/ethernet/ti/am65-cpts.c:__am65_cpts_fifo_read() {
...
if (am65_cpts_fifo_pop_event(cpts, event))
break;
...
}
The TS_PEND value read at the start of each call decides whether the
event registers are read and passed to the type switch. Reading it too
early could give:
- a duplicate or garbage event
- a repeated ptp_clock_event() for EXTTS/PPS
- the "cpts: unknown event type" error from the default branch
- a drain that stops early
These effects are inferred from the TRM rule. They have not been
reproduced.
Without a description of the symptoms, it is hard to tell whether this
patch belongs in net with a Fixes: tag for stable, or is only hardening
to match the TRM.
The patch also seems to sit inside a net-next feature series. The last
patch in that series ("net: ethernet: ti: am65-cpts: implement
PTP_SYS_OFFSET_PRECISE") depends on it, because am65_cpts_gtc_push_arm()
calls __am65_cpts_fifo_read() and then reads TS_PEND straight away to
decide whether the FIFO is empty.
If this is a fix, would it be better sent to net on its own?
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796179313.git.jjc%40jclark.com
Technical Details
Message-ID:
<179626594448.3146.5046422925015545198@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376241-linux-kernel-netdev=dewy.ruReferences:
<11860c23c6bf9e54dfb10715615641aab8415ee1.1796179313.git.jjc@jclark.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376241-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 2/3] net: ethernet: ti: am65-cpts: wait after each event FIFO pop Date: Thu, 03 Dec 2026 02:45:44 +0000 Organization: Usenet Network Message-ID: <179626594448.3146.5046422925015545198@kernel.org> References: <11860c23c6bf9e54dfb10715615641aab8415ee1.1796179313.git.jjc@jclark.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2125582"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:OWRKyd7tz8KGo7b09za2dgt1R4I= sha256:Soczrfudpw0AReEHmXTSRf29XlUSyVcebGWXPExS6ck= sha1:wBT/uIg41eaXHpoRz/KkpBEwisw= sha256:xlp6PCznv/o5DnqUMPkpUJrTFDR3Zoec0EAsi0+DsYM= 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 6F84B1177F5; Thu, 3 Dec 2026 05:46:07 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 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] 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 R0sEr9KxmMXK; Thu, 3 Dec 2026 05:46:04 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376241-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 91D291177F1; Thu, 3 Dec 2026 05:45:55 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 95B892AB5A; Thu, 3 Dec 2026 02:45:52 +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=1796265952; b=rllSckH7Sj15PsSDdK7VNTkWCcQXHwCGnaRdGfS0v8U9Ez4njh62KYFOQydjUMhqFpJE nP5BP7pRQ74/S86eXyJHRDuMWwOcja2lDm995mjafhRRgXkza8/KsSW/4uxZsa6uo3XW0 scYoNzYeO2m/4i+dzQ6J5482y0vWZIMlcDJOfAEL55hpas1MX3xnk1ydc9Rdkdo0NgW7h JvgLeoL0dDYXCesuHmKO7BmU063xtwqTFz6Z6aeweBghlfQ6kIUkLdyCbkSzBKIPiGsiu 354gZqX1sCZBUCAQ4rEnuUJq3i+0r17H44W7LUdNuXKJlodEuWoG/qFfoXarW/qWHBg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796265952; 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=mRtWNi/Cz5K2n4OdcOQQFJsEP7Znlg/5DLE0ZKq7XK4=; b=TnOwPf7i7MK3oAiVHzahy2gPq1TwOtzyfGEI8QuhWmy2M7vKOJyfBGo5IJDOiONipbRX txTtnnED1RoQn5ncYw8vg6gt4xhIrPaNbO/V+qnqrVoyhzb2bjpSrO/nd1HqxB9jcYRwl FzcpuAznfl7Zl/H/G9TsO4c21vxs97dTBiv+S6uHPirCO3xNVbOdKVT958DFhut8sGH0a gnTz/eEter064hXKdRWM0l6hCqrcQ8KC4EsTmlc7ppac79zKT3xvFPZFnQhfGLFv791uO C8j4S9UQCmAPMOi+/FxWvDKBvniSGUfCp/SYB1bQTl+MxGFxw8PijBDzQUvXy4/84Cw== 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=AQEIembO; 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 6BB6B606A335; Thu, 3 Dec 2026 02:45:52 +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=AQEIembO 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=1796265946; b=UTYp5SWDYlf969ip9RyDVr+jn31TpnKK+Ybx/dpDwn6NNjMVaLokknnst5OfeJhKKZJJ gjtJp9e5fmnZoE7XjfL6Eoj5jHkDdb+QqoDdLrXaPvG1HeufIqjqzftrM3RbElh8aadHp X1MlxaLlx31Ou922pn/zkYqmoLJ1D5pAZomOefZSUibRayP1qUYUDSxr/WkcplTl5S2SY xtJIkOxPK9miTpQ8B3rJIs2ULyPRmQQkjbX0Xp0ThdLnoV/hhi6UgHJCggUGNkydpeDai e/sNgYp6IK1n4mASMFXyaUGrjt2+ps9IcuATKaP1W1zS2Sd9623JpJdI/qKrJ7RQyRg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796265946; 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=mRtWNi/Cz5K2n4OdcOQQFJsEP7Znlg/5DLE0ZKq7XK4=; b=d3WWnhNPFv1f4luKaLMitNATVqkxYaAML2/7icMk7ukdcBNEzXoXN7cYo8wgqaY7Br4d kaDN1he5C9TYFoJSIvIiBFF4QfqQdFYOd9xYVebHnNcN8BladekqowevyUm0Jduby69+q /pJcTlZhgqiR/eHdQlkRTzDqxYCVa//yjf/nVgbj5/I8ITvkpdEFpiB3yEy/Itb2pXTog Br7rsU3f+g7+yix4amWmxeaWHt4qPw3dnuoUOsm0aM1AzlLlh4/83HU5Jh6VB7yJvcEAP me4WFgEwq7FlgZLcEvbehAffeKU7EZ8wxaVpEEXqvxAJAam4ORE9GM7uHArw6ruxErA== 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=AQEIembO; 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 8939F606A322; Thu, 3 Dec 2026 02:45:46 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E89B61F000C1; Thu, 3 Dec 2026 02:45:44 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796265946; bh=mRtWNi/Cz5K2n4OdcOQQFJsEP7Znlg/5DLE0ZKq7XK4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=AQEIembOcqh/F+CuWufuZSiG1Ghsm2yE0kR3z26eRwUK9IF+LbZbSjAdORv41+UpI x4Ysl1h1vXYy50sWY8re1UfN1LIu2vzYPLICebxguilTicA6T50TpE9y0U9qZ0VNCh 6j9SFHbsyzXErHhue7NPXZuJmsnFUQEkTC3aBlWbVSA0FXbPsFCIDBvlbQWpNq3z/S bdwCiv9jbtSY0qc0YXGaxsp89+FdUWWA+tBwd8u0y2r37c3JSwHJvAF95emjzcYGaN VliiyGwV1aw+MSSat5kleUoLpRuaib44X9pZMbf1Xf3UZoGm8krCVZwYFSduWddJY7 Nhs4tD7pzrBSw== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, s-vadapalli@ti.com, rogerq@kernel.org, bigeasy@linutronix.de, martin.kaistra@linutronix.de, vadim.fedorenko@linux.dev, r-sharma3@ti.com, robertcnelson@gmail.com, horms@kernel.org, nm@ti.com, vigneshr@ti.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-In-Reply-To: <11860c23c6bf9e54dfb10715615641aab8415ee1.1796179313.git.jjc@jclark.com> X-sashiko-severity: Low 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