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=1796558833; b=AEgb1C3bmmrhzfSgE9jXBowK6DIXsod/qy7I2vVNfLrS5lemq6lWTr/otM+3CcmlPPCw GPB5+YvdafBBm9LnF0gtRqYg14X6y8Rk1Qfh9QdToMx9rho4dGcEARWoSb31o9WRDXh7i NSv5uoE/yC3gA7UNQytYtNEejhckOopi8mvUSQRcOlVvL+VtmsKbZL7tJHE5iEBqvZaBS yf4as8WFmnKaFSpezL3WkwrdElHFzTnO7iUoudteBKMCXIitgRswjACRgBNMwcknOi2rt o6jNzwplvVpcESx9+UWbzpQGMhy05+heSBUHriq7/NE5QcUQh4sILO43t8xI8nuwphw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796558833; 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-Spam-Details-Enc: X-Authority-Analysis:X-Proofpoint-Spam-Info:X-Proofpoint-ORIG-GUID: X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=LimEewxLzl/6VMu9Lhd3Ml2frclGIkvCB5zsvZGbnR4=; b=o8QUI3y08jA6zBAiSag+lkeflyiC/jvvT6HKBcWbP4tp6ZE/ij3F9tAzbVESrUMf0gI1 5eRObSqgMOGBDR9GkMZe6Ucvlxr+nOlEju7/BeNHP1NsYECx2dMrX7blFK/1vw72bPKpO ZpOC/QkT+eq5MU7d4njVApD2gJikzeBIogNOrO+OO2EWRj8LsnTrjQelmXIEJy5T+bpgb VzFeJN0qx4b28t0PoPYUJqZRi0AT0bwNKGm244NKA37JnNuLmdRhUGS6qrT0OJm4cqJbW zcBCHWwTUcKIXoMZN/R9mHxhWUIQKWaxJDZTrexrI0d7Yt81/RiHz/av3aGa2aCWqrw== 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=Qj4Te35W; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=SfLHdVkB; 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 80545606A31F for ; Sun, 6 Dec 2026 12:07:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 80545606A31F 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) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Qj4Te35W; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=SfLHdVkB Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B6AL2uK3923795 for ; Sun, 6 Dec 2026 12:07:12 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=LimEewxLzl/6VMu9Lhd3Ml2f rclGIkvCB5zsvZGbnR4=; b=Qj4Te35WD4Y+l3HbsbkYJs+yHNRrzLVZo6PkekHR MwT55CaBwVQKGSnlrtv+1i6gHAUQ/R9OzQnZoCAcMfRSwWGpXwobWq/vTNdKuapI wQK4GebIi36voq337H9BWgKo6ZWfaJ7/x23MLvOgj79ANBJ40XfPC2us0OeDztGD 8DcGnzMHKpbQ3qu+ftyFQHthk87q+h++P1R+7pWUeJOZAV4ozPakeLDCukHQZ65x sfQUaPyo+lYN3O/dvt5haVAnY5KMDzMV2THdTwi9JpFR6loacQH5jNW/woe5FclU LccBNhNQZcJD5Ke/acTSSEqSRzD2eFsLgAMSZYczPW/QiA== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jcbjs3gdf-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 06 Dec 2026 12:07:12 +0000 (GMT) Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-92109408212so44492296d6.1 for ; Sun, 06 Dec 2026 04:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796558831; x=1797163631; 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=LimEewxLzl/6VMu9Lhd3Ml2frclGIkvCB5zsvZGbnR4=; b=SfLHdVkBOjC1yyt4LLxMNapXl7zDH7OXFSZG/3SC8ecQqxXFfgeqfUqil13vc1GlF5 KTu1ZuMjSzm+yC+76fkWKpwWSuMOrzP/80iT5DRZ9ExEQa5xZ+6QPlcSw8hRz/BcST+x EjApC3Tikys8n10NtKl3rdAETISxK5ja9zG6WUTUZxJqSmdzVIwNXaI402yebHXNOB/q ZtEnyJozb2SG9LxzJZs330Gt81RXgCuwDn/fWCQH2A0fXdtfx35pyF5ylSAsCxIoGAOg P9XbjhoZSr5HH2MjKN93tcYwR0x7TozinafiqH3ctyUDDoc8/IBFgEN9NrstCpeJIkc8 m26w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796558831; x=1797163631; 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=LimEewxLzl/6VMu9Lhd3Ml2frclGIkvCB5zsvZGbnR4=; b=MmfblWq5W921Q75+ZCGsGuw/ZNyHFYV/dGS1y6HxsQNmVkmnUA4gIVFkUtqbfI5rpm ChzaVIqrjJIBjUMD9MGgNzVxwwKmwwTTXXQQak1Zm8FT60/Pz85UUKf1EIZDvZpob1Oi 7sz0W6BsL0xjhOAsoXcgcfj0sEzrzIHUJ+Huu/dYDILATv3q+aySYkLdAoi3rPqMr3e7 TPS2EpcPsZQOjthjY6iG/f/GESXpmRmt1ZCiyf53prpuD4Bx/JLWNYE4Nxq/rPMMXU5W aS+q1plF7cB9IMPpwkRfW6gTl2chPGgCsYW7cXwsWBNr9zGuElpbDOjUgTDNakLqCOfA rbQA== X-Forwarded-Encrypted: i=1; AL+hErFSoGC5F+Dph5teZUG6E0pQV+g1GtfgxH0kQYfWG/r06pftTBZb34JvCA65X936xdf+KVSR14Y=@vger.kernel.org X-Gm-Message-State: APuU4Z83d6naq1Ekror2U6e5pHBDphej9cniBpn8DWvQPNAL1y6VLoJq O7UPpHz+8C1QqqqrI0gvmPHddvbdUaWyENthsbXQIF43yEIiizLStPgFgYPY8bYLrMQNxq+dxMH 8DwkCrFXS8nb9H0tTEWs9vTVDfHW6Ki/TVQMfFvd2DVYzNbvbiwdTvcvOncI= X-Gm-Gg: AZFdTZeDe4cekMAqelAtMrqjdalYBIo5TQWNrOQBCWYCYMRX2RgKK/iMXctUZU3FwM3 bZx/LdmHItxu30QNgNxPmIbesYPJcU8dKh6ypI/cUKdRzRLg8Lcd4na53BBCQuc4R8afUozi/hO 0QoXW6Tz+GWsFQCl5jRNV8575MGjs1x6rOEMbnl3DKyUOyCVPRHgI1NBYuahtonA25yZMkuDDzU iAsGkPqjLbRFEzAkG3Jb5J+VdcBEvXx8QkuOvglDUMSgrzOJL/y5s3iwyGqQqn7dzTa+D9Udtjs JUW8fTn2Dddts5IxdD8nD6HaSJYkojjh/8wGwmDTCORSzVopl4ursJSmTcUlDnaTDQ4WckAzCth kTNj9NdOQd5872YgvcPeKMHoYpuYHGhd2tXBJBTjs3Z9dsxzm4W9F2AZnGhe0rQ== X-Received: by 2002:a05:620a:1a10:b0:949:3ec9:9d6 with SMTP id af79cd13be357-94a82dd93cbmr1174866785a.43.1796558831451; Sun, 06 Dec 2026 04:07:11 -0800 (PST) X-Received: by 2002:a05:620a:1a10:b0:949:3ec9:9d6 with SMTP id af79cd13be357-94a82dd93cbmr1174862985a.43.1796558830902; Sun, 06 Dec 2026 04:07:10 -0800 (PST) Received: from localhost ([130.25.105.85]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbf1679cc8sm92762015e9.0.2026.12.06.04.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Dec 2026 04:07:09 -0800 (PST) Date: Sun, 6 Dec 2026 13:07:09 +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> 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="MdfTR0cQXIqb+ULr" Content-Disposition: inline In-Reply-To: X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA2MDAzOCBTYWx0ZWRfX59sBzA2kfcpy iUNIjhvQ2R4eyrd/Jw1tgsdBy0DK8nVNfynu21R197E6aXuW0g8fBsxRAn7GrZ3vfwtoyVx2kTT AkboaGNmt6bkfE9u5zWRkOVjGaF4goB3uq3VkJqBEZNQmMh7ldtNpSbfppuZdewvvtr2VgNJE1x W0LYwEeTxHgAlZOERz1CqU5UUwagGJlV3v3BAMsz7gbSzdSq/vojG/F5xasXric2+eR47mkhd4U Zl2nWASJDS+mors5NisZsvs0Je6M7Ggh4ZpTymeUwIprDQecaZ7/3HGEeaBc5CTt73Puka/jAvD Zo4YdunuI5upCEZkVXRpLv62wC/cSs/+AEphPPViiN0vseRVohPrTSFFWup46wsNLzvXLd8YZ1Z x6mvBBLWfBAE4CAJ9qoWF8xb1eksbVNCzraUPmIdNsYLT9WV5Kvra969UaQVILLW6saczFYCf8o K2Zs1HKce9yiPcBXg8Q== X-Authority-Analysis: v=2.4 cv=OqzaWC/t c=1 sm=1 tr=0 ts=6b154ff0 cx=c_pps a=wEM5vcRIz55oU/E2lInRtA==:117 a=RcFDq6c+avmIvxkL9iwlxA==:17 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=NEAV23lmAAAA:8 a=WZhvhkGb_tGRX5Gvt2EA:9 a=CjuIK1q_8ugA:10 a=WjxvRvYk3ZeoD6JKwfkA:9 a=OIgjcC2v60KrkQgK7BGD:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA2MDAzOCBTYWx0ZWRfXy+lBGMTrhRBW 9CrV8lfO5BUJ22U1wcjDGGGtFNldaoc3zq+P27pJWE5vcN8cymsqC/NepueVVFqPbFrigardXaU Plsw9L+6ik51VmmHm8lEBmFykjpu3ik= X-Proofpoint-ORIG-GUID: kjMvkPJvgPkqW3_60Yzrx-mLZsjylZxi X-Proofpoint-GUID: kjMvkPJvgPkqW3_60Yzrx-mLZsjylZxi 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 priorityscore=1501 impostorscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 bulkscore=0 phishscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2612040000 definitions=main-2612060038 --MdfTR0cQXIqb+ULr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > Hi, >=20 > 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(). > >=20 > > That proxy is fragile because it changes with the advertised offload > > set, and it does not cover CONFIG_VLAN_8021Q=3Dn. 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. > >=20 > > 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. > >=20 > > STMMAC_FLAG_RX_CLK_RUNS_IN_LPI is now redundant, so remove it and its > > qcs404 setting; keeping RXC running everywhere supersedes it. >=20 > 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=3Dn) 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/87da83ada7e971e78908= ccbd5bbe104b00654124 >=20 > Besides that, we have an async version of the .set_rx_mode() NDO > now: ndo_set_rx_mode_async() >=20 > Maybe the right move is to switch to that ? >=20 > Maxime >=20 --MdfTR0cQXIqb+ULr Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCaxVP7QAKCRA6cBh0uS2t rM6HAP4vEUylKW+GxS8IVPVtnvo8ifJGlFckeyiKcEy6UKltGgEAh4oUZJBQWo+t J3nvARr7HXe5TdRETyIQK9NLHTFG4wA= =lwDS -----END PGP SIGNATURE----- --MdfTR0cQXIqb+ULr--