From 743f2cd731b1186c86b7d9451d2ef6b81fcc4571 Mon Sep 17 00:00:00 2001 From: Harshal Gohel Date: Mon, 14 Jul 2025 10:59:06 +0200 Subject: [PATCH] realtek: rtl931x: Don't use RTL8xx port flooding initialization Neither the RTL930x not the RT931x use the BPDU flooding mechanism which was used for other SoCs. At the same time, the RTL931x must use the same debugfs initialization function as RTL930x. Signed-off-by: Harshal Gohel Signed-off-by: Sharadanand Karanjkar Link: https://github.com/openwrt/openwrt/pull/19569 Signed-off-by: Hauke Mehrtens --- .../files-6.12/drivers/net/dsa/rtl83xx/common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c index 2dd93de5522..9ccf1e1840b 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c @@ -1691,8 +1691,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) goto err_register_fib_nb; /* TODO: put this into l2_setup() */ - /* Flood BPDUs to all ports including cpu-port */ - if (soc_info.family != RTL9300_FAMILY_ID) { + switch (soc_info.family) { + default: + /* Flood BPDUs to all ports including cpu-port */ bpdu_mask = soc_info.family == RTL8380_FAMILY_ID ? 0x1FFFFFFF : 0x1FFFFFFFFFFFFF; priv->r->set_port_reg_be(bpdu_mask, priv->r->rma_bpdu_fld_pmask); @@ -1700,8 +1701,11 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev) sw_w32(7, priv->r->spcl_trap_eapol_ctrl); rtl838x_dbgfs_init(priv); - } else { + break; + case RTL9300_FAMILY_ID: + case RTL9310_FAMILY_ID: rtl930x_dbgfs_init(priv); + break; } return 0; -- 2.47.3