From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796560365; b=FSFuMxu1Y7+ZFsED/eaRZV+mcRt8sqIB4hnQTbFXucR8F+0hdL5b/6s1JVzDGAfIzXy/ uSh8gebtxEeXw4f/cDHeX3/g7mCRcTzTH3+rJi1wOc51xVQ99Fo9e58iD9LowR+IX4GPQ phnWM1DRH2wsZ2ypl7PlicwIlGXp81srkQ1qcC7dAmlhi7nXbUB3X6FLiLMN3NEHu7lNB 13y/klkdgzHXgUiw9MoelDE6gm7kdXLsnpkx7kbxB5esDr7Wf1vH2FO5Z5q4Ugp24ZjKO TDcU41pFBfUgVQEKRn5mmnBI0NrQHY8MxOusFgxuW3ZcY0sOC41WTjVhC/aoNOtEGGg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796560365; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Date:From: To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:X-Proofpoint-ORIG-GUID: X-Proofpoint-Spam-Info:X-Authority-Analysis:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=kmwZ4SMq8cD78k1Cvt+E0P+Wt9K/Dsjp/8UwNAOtBos=; b=qVJWn837cxPhLoWsrB2nN5pEZUp9Rf0/9arNuU6+EdfILeuD/8nVRatDTgYY+CAl4MGG r+jetuS7utiPmYLmy8QqD1bkRRyZwRF527sJixnwzNZFapme0HEF4hynXJOzfpyiLVSjQ pwBT5zMhG+KHWtn3OFCKOKdjUY/Mb2DoJyZqEh0Jqa91OS4OAq7ZQxUXG0MiSVVA1JIym 9vuz0HU0wRtJe6RrXWr5cjEEE4vXlQ3tbaxnCclmm0kTnSYebJCkz/7PVPhq7xsE9axw9 MGcGOH7VxdknZuLhT4z+eFazPxTje9OPdE1G/Esaq2+NmboRcDTfgc/48Gb6xA+wZQQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=DdHhpSJB; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=XQCNHyNC; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 D4578606A326 for ; Sun, 6 Dec 2026 12:32:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D4578606A326 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=DdHhpSJB; dkim=pass (2048-bit key, unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=XQCNHyNC Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B6AM4xD685740 for ; Sun, 6 Dec 2026 12:32:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=qcppdkim1; bh=kmwZ4SMq8cD78k1Cvt+E0P+W t9K/Dsjp/8UwNAOtBos=; b=DdHhpSJBv5g/ox1MIM9NVJV07s61bkaSTpvLdNiJ 6AbCeU9BojEEOdaCeTB1f+DdgdKwQgL+6VaEzQ21V/C4tw0aqZQ0kiPGc1KVW5Ly ljPfPEuRcL9o/XrhJuwNxcRhUXyuOj8dume3YAvIil6SW8/ItSRSny+a0cgblCkP wEjDkw55YyoUyuG2uVNROSlguzdA/3dJUfGTWUmQ2fP+81mBSphVpqD8xAr5QGwF NhSFoEsrpK6/8k4Mf0qcQlp6p2PN4Ml5hRKYEbv/3AVbSnO4dpHoXTrdi1QobyV9 OQvaM1jmzH2bXjV4bz8UnvgrxUgsZbwjLZTcr07b1RwpvA== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jcbn4uq8d-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 06 Dec 2026 12:32:44 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-946038e22f5so542229185a.0 for ; Sun, 06 Dec 2026 04:32:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796560363; x=1797165163; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=kmwZ4SMq8cD78k1Cvt+E0P+Wt9K/Dsjp/8UwNAOtBos=; b=XQCNHyNC5uEQ1rQv4u8DTxkLl5pMrVTF+O3xkk7fzKisky2yoqrtxWoIy8bw/bwr/q 5a1z9ddKZs7boH4F1/f4LmqitEVjWQ8Lri37nJCoHkYl7hMwK6liRv3Ku+hKntW5vVHE 5xM8dKC9apLn4FZ/ZEN+2YgpxJB+ZVtfJQx7CWkjYY0fC6viTr71WkT0W1YClkBJfLaL ZxsoL0SF3AE7pzkVd5LMur26QRaWJ73lP4APLx/nksgP/VBXDYNmZCN6D+h8JBV/1W7q 9oDrBwDeKQLjDF3kHIaD3HRp1EO0G4tQlvSbE6+0+lrEx0w5JMfLfsWBVcA9H0NPk6BP ayfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796560363; x=1797165163; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kmwZ4SMq8cD78k1Cvt+E0P+Wt9K/Dsjp/8UwNAOtBos=; b=PfhGWv+ACa4TVyiThLk3fKfDmPVto9jGUxhNcQpYKLf/SY7gEbutPj45V2IN7exsgb t5nPh8t3dVg0doswLsPSWZYBq3D3vwjfeJq/4le7IRZ/hN+9LjGnOUsdwmRWao50yu3U 61Qb/iNHsgk1Ygf9fdf85qLM9ZnhPz9Uz6aqlAU/bYjOgbcq/Cm0pFS+VKAZ7/WMfwCi tu14949kMLG6Zm/xpik7wWD+BrRcAy7rJQFhlOHcPErXtJdgHDm8xCuxqQgHCkkp+EcP ZIQW3MeLdvn/nDD/BbllfSUxqySljVk1zqM9kRiTU8TwByQ2FX+p5zRG3q7GWwo+qgOg XEDQ== X-Forwarded-Encrypted: i=1; AL+hErEumQZjdzGuPhV3xZLfpB1iSeA8HZE/b8eVsHo/MIdn2RqymOPF/g/Wz54ehaE0JtHX1zbZIoA=@vger.kernel.org X-Gm-Message-State: APuU4Z8bn/QnqAfcY8X+rPA8e7RZIXgKo/JR76PMG7ij1rnPe2AY7dAV WUCXvjQk/2sgfKTkkYae40WVu/RiLgmGTjFrVhF9l5XEEtJTCtK+E01mWZybIj6lujoOO/buqi3 DZ6twmkRZlpui3ceRnm6C6aTOCfA8DWvg7IedYOHioxtqUf14Oq7zcLjA7VU= X-Gm-Gg: AZFdTZe0X5JHWSPlGmjgd6M3ahr2jb+drCrKyFrPF3X/URMlf96fwVxqYmamPGubYg2 SZrx44rkIPn4tB7lWbI+zd8xfEp5L2aFuv+Wqf7r3N0dRhTPHwIgcq9SBxKkrDqHm+0kPOt2MVm 4eeUx5AodHo7EQyT6+dr+KUZsc29Tif3TNNW+N88tLTMsHlA31/PIxHG29Zo0lNxB8hwulpI/M1 +e+WVaf5WI4zjvr2c45dK965XIERBFvLRyaG8oKBxjl6Rmpz9t2cBtn+x7zOyGgNVi76SLOvmvH p27z7TPfgyLRHW+jn9QlRVjKZvAvGydzT03gp0dA5P/nofvPq8RQiIXN1GyoBTOFRrxil0nVWuM vfg5M1/vE76rcsv1VN5E6YeLigbZWriQUIfFyBiEoBRt/7uT9VDiYTRDg21apNQ== X-Received: by 2002:a05:620a:2725:b0:949:6ece:8ae8 with SMTP id af79cd13be357-94a82e1b956mr1114884785a.71.1796560362938; Sun, 06 Dec 2026 04:32:42 -0800 (PST) X-Received: by 2002:a05:620a:2725:b0:949:6ece:8ae8 with SMTP id af79cd13be357-94a82e1b956mr1114881185a.71.1796560362351; Sun, 06 Dec 2026 04:32:42 -0800 (PST) Received: from localhost ([130.25.105.85]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbea25ce51sm204378985e9.5.2026.12.06.04.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2026 04:32:41 -0800 (PST) Date: Sun, 6 Dec 2026 13:32:40 +0100 From: Lorenzo Bianconi To: Maxime Chevallier 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 Subject: Re: [PATCH net] net: stmmac: keep RXC running for atomic filter updates Message-ID: References: <20261205-stmmac-keep-rxc-running-v1-1-35f8cb71cb98@oss.qualcomm.com> <40dbae2a-5ca1-4f04-b48f-a74aeaf11ab1@bootlin.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BRLEAEP3fPCv8liI" Content-Disposition: inline In-Reply-To: <40dbae2a-5ca1-4f04-b48f-a74aeaf11ab1@bootlin.com> X-Proofpoint-ORIG-GUID: CT1F3OKhBeHcYdGF_9vwqQWtCgjIuoyO X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA2MDAzOSBTYWx0ZWRfX2KZ6YPBKqXrk Dlk/rWnYm5kCKdPL7OXR1k91CtgrvBhrTnxzaY4mV8y68zfmm9JxTNc/XE9PIi7lpaK0hR5JEBb 267V66sYnD6gwjSd5S+qsN9mtrI816s= X-Authority-Analysis: v=2.4 cv=QvLLTlyd c=1 sm=1 tr=0 ts=6b1555ec cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=RcFDq6c+avmIvxkL9iwlxA==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=NEAV23lmAAAA:8 a=-3Eomzg4ud0mpqTE3PkA:9 a=CjuIK1q_8ugA:10 a=OPRz8Pm1ynBk8atnC-MA:9 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-GUID: CT1F3OKhBeHcYdGF_9vwqQWtCgjIuoyO X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA2MDAzOSBTYWx0ZWRfX+OtTDZkF3YtJ 4NCv1XjEAIFu571uwUiQjAj9t1dokX0y4YpyJ9MyUg00ZGDYkPpJ1MBSL+ngC/yJA0xd2EbgeiK RR9rdfByedrEUayfdE+DDX2cSpzD5KUF7rpcmUOSeM6vL/1BfrzWX1f68x7ONAgSO0uwVaz8J8k /tbE2fBqmMdwHD2faZa6zsiqJ17gnpjudMxZHq5i/jNHez4BfJd05rsIIgahHSXcF1Hcp4JcLyZ gQ53rCFURDRYrAvfD8C/YNE7bITpw0/LEbMfAuwoUm1MWX+DAk5K8kXPgIowc802chIUOtFOIYu tYIF95HP8sf9bRNvzIL4OzyBa1hPAaV6bMq4mSVpZ7nyJy1AMqwz+MSVOdlR8N130NFoRV/V73m meeZ7shXGj+JWtdLuBG0oTmPXt471JmOrleeDSIeZPPIV/u3rXS1npgwLC8GmDXbxXo7PBG18Ob EUrbmWJbhErwhOpzgTw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-06_03,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 phishscore=0 spamscore=0 impostorscore=0 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2612040000 definitions=main-2612060039 --BRLEAEP3fPCv8liI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 06, Maxime Chevallier wrote: > Hi, >=20 > 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 a= re > >>> advertised. The VLAN feature check was only a proxy for "the driver m= ay > >>> 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=3Dn. A filter update whi= le the > >>> link is in LPI with RXC stopped can be lost, leaving the hardware fil= ter > >>> 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 ? > >=20 > > 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=3Dn) there are multi= ple 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 comp= lex :) > >=20 > > Regards, > > Lorenzo > >=20 > > [0] https://github.com/LorenzoBianconi/net-next/commit/87da83ada7e971e7= 8908ccbd5bbe104b00654124 >=20 > Quickly looking at it, it's complex but not as bad as I expected, this ca= n be > a nice series on its own :) >=20 > 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 ! >=20 > but hey we know how it goes now, 3 patches in a small series, a few sashi= ko replies > and suddently we have a 20-patches backlog... >=20 > Do you feel like sending your more complete change ? sure, I am fine with that. I will test it a bit more and then I will post i= t. I guess we should target net, agree? Regards, Lorenzo >=20 > Maxime >=20 --BRLEAEP3fPCv8liI Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaxVV6AAKCRA6cBh0uS2t rIDoAP4j2qcObBzrAJVoLubJrEC2yNJDZIHCrTzRhrl0MiiYxAEAoV+Cdw2fkwDu uZqTy3gGFtul4NNPBOMdZ9HncosKhwc= =rHP8 -----END PGP SIGNATURE----- --BRLEAEP3fPCv8liI--