From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DD44606A335 for ; Thu, 3 Dec 2026 02:45:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=gCt0epJB; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=AQEIembO DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-ID:Date :Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=mRtWNi/Cz5K2n4OdcOQQFJsEP7Znlg/5DLE0ZKq7XK4=; b=gCt0epJBllfXvNqje8qgyHggP7 EnqHc3snGPlMmjHf18+VO8O/zxanXCTUfLArntNaNxbs++Z2NCBRUF+YgDXY9tq7E4p23OVF9APrc ckajgdAY1Uor+EQmAVJLB8vHQBPFWVm7T3l+TMC/SDiqgAJqKAqkaipeuUwDMXX/kRn1/HPBr3gxz xnPZp2lIr1ivjlIYXrzyj42hJvmlUr/U0+YZs3fIodJv+B8pb+c1Psz7K5yZrTYH5r0uVHJ67uJwD O7k5VPfYJb/Fc0+DeqNMLBopPDg9TnHhQYQPlTZ+oi30KwWGa1aw+Cy8C/XE2Cbwl40rkjiyBTsXi BwmyEdog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYwpQ-0000000DGpv-05GQ; Thu, 03 Dec 2026 02:45:48 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYwpO-0000000DGpg-3yNW for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 02:45:47 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 665D660E7A; Thu, 3 Dec 2026 02:45:46 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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