realtek: dsa: rtl93xx: Switch to MSTP compatible STP mode
authorIssam Hamdi <[email protected]>
Fri, 20 Dec 2024 15:24:53 +0000 (16:24 +0100)
committerHauke Mehrtens <[email protected]>
Sat, 15 Nov 2025 15:21:16 +0000 (16:21 +0100)
The realtek DSA switch driver sets up all VLANs using CIST. It is therefore
not necessary to enforce CIST using the ST_CTRL register.

This allows us later to overwrite the MSTI of VLANs. This is necessary to
get MSTP working on RTL93xx.

Signed-off-by: Issam Hamdi <[email protected]>
Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20421
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c

index 59abba780755807af83ccd462e8e3f56eb3751fc..3cbbb1a5224c3bda29aa18f31a5c20e43912009b 100644 (file)
@@ -1501,7 +1501,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
                 */
                priv->version = RTL8390_VERSION_A;
                priv->ds->num_lag_ids = 16;
-               sw_w32(1, RTL930X_ST_CTRL);
+               sw_w32(0, RTL930X_ST_CTRL);
                priv->l2_bucket_size = 8;
                priv->n_pie_blocks = 16;
                priv->port_ignore = 0x3f;
@@ -1521,7 +1521,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
                 */
                priv->version = RTL8390_VERSION_A;
                priv->ds->num_lag_ids = 16;
-               sw_w32(1, RTL931x_ST_CTRL);
+               sw_w32(0, RTL931x_ST_CTRL);
                priv->l2_bucket_size = 8;
                priv->n_pie_blocks = 16;
                priv->port_ignore = 0x3f;