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 AA965606A33F for ; Sun, 6 Dec 2026 12:24:19 +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=Ygzrj9qP; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=AW1rJMM6 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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID: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=JnYPGZ8BjdqaK3g1qvQIsg4CbML9RcFhXF2QkKTcG3o=; b=Ygzrj9qPtmEI12 X/P4mUZZp9bWy95F0bBpfHKgtXu5A4otjG3lUEcGbZSZHIYu5vX5zVyaVHgov/rQ5vGlyy+hc4Qzf FMF6GLeR8TYMfXjnweGx8S6WK0Wk7oLHY7r0J5spLkbWpnzGXbjXCEB6xjWQDjBXRqokhcP7/R8C6 biDZ2pixA9Zi2pttN+RfFmEiKmXDIIcplnVlJ1P8VL01SAZRoLW5PfR157a/yTeIRLsMl7ZzN0BM2 NB4S8W1Zs1HsPegHu+3zGCyYogwLB/kpJ9J/kQFtWkQxlo4U1ogvo5l3cjecWO3kPXvuZV09WvnxV URdmB+AUwa/cdFr33oCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xaBHl-00000003Yz0-3aNL; Sun, 06 Dec 2026 12:24:09 +0000 Received: from smtpout-02.galae.net ([185.246.84.56]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xaBHh-00000003YyB-42bX for linux-arm-kernel@lists.infradead.org; Sun, 06 Dec 2026 12:24:08 +0000 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 5E1E71A19A7; Sun, 6 Dec 2026 12:24:00 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 26191604C0; Sun, 6 Dec 2026 12:24:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 041A511EA00AE; Sun, 06 Dec 2026 13:23:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796559839; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=JnYPGZ8BjdqaK3g1qvQIsg4CbML9RcFhXF2QkKTcG3o=; b=AW1rJMM6SVL43jEv6YgnIXLKsnlfW5hx6Vqk4vtB5owcYsCOYeZDI4dcJ5nrhfusfD6GBq rYiwipSeyd6ZUE+zG0Q/j8biY1kocS7e2ch0gMGWLYe9isvOShx1QYQA7IlfNebmLs2U8D Lu1ZZn3oXuiJF4kjL9ymbgXOR6gVYDfOPsgv7eMqz3rtVSJMzQUTBrv1gzAMDrZEct3d0v IvP5xId42y5hMct9X48+l3Dg5qezRB6w13v5L1WFWDWDKTXnAPWhBO5VdHFJD0q5ja7buX tFCfOcetcvLXCgKX6us5TTpozvZA8+klO2+W3y841IluyAQyw/E4/zkEw2yVVg== Message-ID: <40dbae2a-5ca1-4f04-b48f-a74aeaf11ab1@bootlin.com> Date: Sun, 6 Dec 2026 13:23:50 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] net: stmmac: keep RXC running for atomic filter updates To: Lorenzo Bianconi Cc: Mohd Ayaan Anwar , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Russell King , "Russell King (Oracle)" , Jacob Keller , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20261205-stmmac-keep-rxc-running-v1-1-35f8cb71cb98@oss.qualcomm.com> Content-Language: en-US From: Maxime Chevallier In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261206_042406_146330_48AB9FE9 X-CRM114-Status: GOOD ( 16.42 ) X-Spam-Score: -2.1 (--) 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=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 Hi, On 12/6/26 13:07, Lorenzo Bianconi wrote: >> Hi, >> >> On 12/5/26 18:31, Lorenzo Bianconi wrote: >>> stmmac_phylink_setup() allows the PHY to stop the RX clock in LPI >>> whenever the platform does not need RXC in LPI and no VLAN features are >>> advertised. The VLAN feature check was only a proxy for "the driver may >>> program RXC-dependent registers from atomic context": >>> stmmac_set_rx_mode() and the VLAN filter callbacks run with bottom >>> halves disabled and cannot use phylink_rx_clk_stop_block(). >>> >>> That proxy is fragile because it changes with the advertised offload >>> set, and it does not cover CONFIG_VLAN_8021Q=n. A filter update while the >>> link is in LPI with RXC stopped can be lost, leaving the hardware filter >>> out of sync with the software address lists. >>> >>> Since the driver cannot know whether a filter update will happen while >>> RXC is stopped, keep RXC running and never let the PHY stop it during >>> LPI. A platform that has verified its filter programming does not need >>> RXC can restore the power saving in a follow-up with an explicit opt-in. >>> >>> STMMAC_FLAG_RX_CLK_RUNS_IN_LPI is now redundant, so remove it and its >>> qcs404 setting; keeping RXC running everywhere supersedes it. >> >> That would introduce some power consumption impacts though no ? > > Yes, you are right. I guess this is a trade-off between correctness and > simplicity of the fix. > If we disable CONFIG_VLAN_8021Q (CONFIG_VLAN_8021Q=n) there are multiple spots > (not just ndo_set_rx_mode_async()) where we can access sensible DMA/MAC regs > while the RXC clock is gated. > I drafted a possible fix in [0] but as you can see it is much more complex :) > > Regards, > Lorenzo > > [0] https://github.com/LorenzoBianconi/net-next/commit/87da83ada7e971e78908ccbd5bbe104b00654124 Quickly looking at it, it's complex but not as bad as I expected, this can be a nice series on its own :) It's important we get this right, the RXC thing have been a never ending source of problems with dwmac, and we have the plumbing in phylink to deal with that, I'd be very happy with this being behind us ! but hey we know how it goes now, 3 patches in a small series, a few sashiko replies and suddently we have a 20-patches backlog... Do you feel like sending your more complete change ? Maxime