From mboxrd@z Thu Jan 1 00:00:00 1970 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 F071D47DD6F; Tue, 5 May 2026 14:16:52 +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=1777990614; cv=none; b=Urosm6bjlaonDZEMW+DJQK8JaJDwhyKr/PJvHU2+5ze0Sg1eLtjy/VTsLGlqzalnxpaVCj5YrYo+0kupAJT5M88Lzr4qniEcXKzOmIsjeB2DX/AlBRv2O4HBYzibBmgxRPPp/yc4MqJ6hG0ncocT9M6kTk1/yPZOkDzxtUjxe4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777990614; c=relaxed/simple; bh=+e6JlMiLz06FcGnhoVMspf7Hx3agl1zTP6hy7LoMFXU=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tt38o8XI5tFapPuWnkE4n1BssPW//H9c1QAgHjoFjaqkN233OYB0cz76RuCDZwdrG6rjemGEGuL4PrSqdD/3qubc0SG6f28FOYj+VpzG/1FiL7euSmx3TRcdggpQBusvmMYLNaN32mwwjtVIH/VkVV8+9D4I80V+TWurIe6ln+k= 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.99) (envelope-from ) id 1wKGZr-000000008SW-3pOj; Tue, 05 May 2026 14:16:48 +0000 Date: Tue, 5 May 2026 15:16:45 +0100 From: Daniel Golle To: "Chester A. Unal" , Daniel Golle , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , DENG Qingfang , Florian Fainelli , =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= , Sean Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net 4/5] net: dsa: mt7530: clear flood flags on bridge leave Message-ID: <02ce0ee0e072a16d9ee1bf42552225482196e88b.1777986341.git.daniel@makrotopia.org> References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Flood flags set by port_bridge_flags persist after a port leaves the bridge, causing unknown unicast to be forwarded to standalone ports. Clear UNU_FFP, UNM_FFP and BC_FFP in port_bridge_leave so that the port returns to its initial state without flooding. Fixes: 5a30833b9a16 ("net: dsa: mt7530: support MDB and bridge flag operations") Signed-off-by: Daniel Golle --- drivers/net/dsa/mt7530.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 7cd8566a31e6..2e5337186800 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -1767,6 +1767,11 @@ mt7530_port_bridge_leave(struct dsa_switch *ds, int port, mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK, MT7530_PORT_MATRIX_MODE); + /* Clear flood flags so they don't persist across bridge leave */ + mt7530_clear(priv, MT753X_MFC, + UNU_FFP(BIT(port)) | UNM_FFP(BIT(port)) | + BC_FFP(BIT(port))); + mutex_unlock(&priv->reg_mutex); } -- 2.54.0