From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E89B61F000C1; Thu, 3 Dec 2026 02:45:44 +0000 (UTC) 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== Subject: Re: [PATCH net-next v3 2/3] net: ethernet: ti: am65-cpts: wait after each event FIFO pop From: netdev-bot+sashiko@kernel.org To: jjc@jclark.com 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 Date: Thu, 03 Dec 2026 02:45:44 +0000 Message-ID: <179626594448.3146.5046422925015545198@kernel.org> In-Reply-To: <11860c23c6bf9e54dfb10715615641aab8415ee1.1796179313.git.jjc@jclark.com> References: <11860c23c6bf9e54dfb10715615641aab8415ee1.1796179313.git.jjc@jclark.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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 [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