From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39CABCD3427 for ; Tue, 5 May 2026 14:16:59 +0000 (UTC) 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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3e4o+tIWLAmL0saPvo6RgB2xCrw5Ux1OfIkBANxJ2XY=; b=BC4RvI0zmVdsNCtKs6/M+KtiAy erbtVnidMONBNuxrK8gj5/5rP3PWbR3+8atHWUz8e++GkTBhpjf5RU+lNfL9UKUeKUXaa6YzPRt/H Z7BCGha0mK8AqANQ0w5WE83mTClgTV9Pd57DMaAJj3pr+JZwTREyx3vGocMmyRh7BXYRGjwAiwlYA Uhgbd1L8YPinkkWynelbtahr/H7br8Wi85HgdblDq+7AXuwzCifRGp2SdazuZ7dCzYFqbEsJA0Hr9 oxB8TDIvIkNY9hfYOimlXJ/F3/kqRUbbHbYLXeA70pNGtUfRV8AIU2EPkQ2g8a+fo3WO+qEmc8uON Vwb9k4+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1wKGZz-0000000GTf1-1bdx; Tue, 05 May 2026 14:16:55 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1wKGZx-0000000GTcn-0JkB; Tue, 05 May 2026 14:16:54 +0000 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: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260505_071653_113187_B7B99128 X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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