From nobody Fri Dec 19 18:45:47 2025 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05F5510A1F; Tue, 22 Apr 2025 03:10:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745291456; cv=none; b=YBhg/ZplWLhSe1rscMm+EcRRdjZdjosq7FDDUuQPpLSNuVEkELwL70MgyESo14/ZTqaLYqdVE+h5BVU+2ymfmrQRoxSOL3uCbkjpvgm686Rq4M7fVvOe3tsr89Zcj+DEqCPJ67GqdGihSHT01y1P5AUJI3SWTIcvGdEhc9iNZoY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745291456; c=relaxed/simple; bh=GYsg3nDDsxCC5f/WHunIiWZ82w5GH9824GyCufi9os4=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=u7yhKz7/jLwNkVddMH++iPjR3s+od9zN5lruR/MenzCyMBzesv8nA6r9y+9vcKudTKzSg3fF/XNWfk9xD+kUr5Lq0dWNCV/jnAMYks8Y+uMskkopaykQ/a+qWsMpv3nm3WaKqNt9x2VRiNxfgNkb1pwRW+tOrRZdlG1BHhn0OJg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.98.2) (envelope-from ) id 1u73zC-000000005M0-0aoj; Tue, 22 Apr 2025 03:10:28 +0000 Date: Tue, 22 Apr 2025 04:10:20 +0100 From: Daniel Golle To: "Chester A. Unal" , Daniel Golle , DENG Qingfang , Neal Yen , Sean Wang , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net] net: dsa: mt7530: sync driver-specific behavior of MT7531 variants Message-ID: <89ed7ec6d4fa0395ac53ad2809742bb1ce61ed12.1745290867.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" MT7531 standalone and MMIO variants found in MT7988 and EN7581 share most basic properties. Despite that, assisted_learning_on_cpu_port and mtu_enforcement_ingress were only applied for MT7531 but not for MT7988 or EN7581, causing the expected issues on MMIO devices. Apply both settings equally also for MT7988 and EN7581 by moving both assignments form mt7531_setup() to mt7531_setup_common(). This fixes unwanted flooding of packets due to unknown unicast during DA lookup, as well as issues with heterogenous MTU settings. Fixes: 7f54cc9772ce ("net: dsa: mt7530: split-off common parts from mt7531_= setup") Signed-off-by: Daniel Golle Reviewed-by: Chester A. Unal Reviewed-by: Vladimir Oltean --- See also https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openw= rt-feeds/+/b4204fb062d60ac57791c90a11d05cf75269dcbd drivers/net/dsa/mt7530.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index d70399bce5b9..c5d6628d7980 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2419,6 +2419,9 @@ mt7531_setup_common(struct dsa_switch *ds) struct mt7530_priv *priv =3D ds->priv; int ret, i; =20 + ds->assisted_learning_on_cpu_port =3D true; + ds->mtu_enforcement_ingress =3D true; + mt753x_trap_frames(priv); =20 /* Enable and reset MIB counters */ @@ -2571,9 +2574,6 @@ mt7531_setup(struct dsa_switch *ds) if (ret) return ret; =20 - ds->assisted_learning_on_cpu_port =3D true; - ds->mtu_enforcement_ingress =3D true; - return 0; } =20 --=20 2.49.0