summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Eckelmann2025-10-27 14:29:01 +0000
committerHauke Mehrtens2025-11-15 15:21:16 +0000
commit280cf19cdbcf41ddaad43e0ff9a1e8ed1e92f4a5 (patch)
treece98a8acbb6735c67f20004737e195ee4cdbc005
parent9c2e8d6cef08b63ff95ffe9ddba4f9f11da0ed0a (diff)
downloadopenwrt-280cf19cdbcf41ddaad43e0ff9a1e8ed1e92f4a5.tar.gz
realtek: dsa: Record number of supported MSTs
Each SoC supports a different number of MST(I)s. The code must know this limitation to correctly reject unsupported MSTIs or to allocate a large enough mapping table. Signed-off-by: Sven Eckelmann <se@simonwunderlich.de> Link: https://github.com/openwrt/openwrt/pull/20421 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c4
-rw-r--r--target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h1
2 files changed, 5 insertions, 0 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 3cbbb1a522..dfb4c2f24c 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
@@ -1467,6 +1467,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
rtl8380_get_version(priv);
priv->ds->num_lag_ids = 8;
priv->l2_bucket_size = 4;
+ priv->n_mst = 64;
priv->n_pie_blocks = 12;
priv->port_ignore = 0x1f;
priv->n_counters = 128;
@@ -1483,6 +1484,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
rtl8390_get_version(priv);
priv->ds->num_lag_ids = 16;
priv->l2_bucket_size = 4;
+ priv->n_mst = 256;
priv->n_pie_blocks = 18;
priv->port_ignore = 0x3f;
priv->n_counters = 1024;
@@ -1503,6 +1505,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
priv->ds->num_lag_ids = 16;
sw_w32(0, RTL930X_ST_CTRL);
priv->l2_bucket_size = 8;
+ priv->n_mst = 64;
priv->n_pie_blocks = 16;
priv->port_ignore = 0x3f;
priv->n_counters = 2048;
@@ -1523,6 +1526,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
priv->ds->num_lag_ids = 16;
sw_w32(0, RTL931x_ST_CTRL);
priv->l2_bucket_size = 8;
+ priv->n_mst = 128;
priv->n_pie_blocks = 16;
priv->port_ignore = 0x3f;
priv->n_counters = 2048;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index 8a5c8ce4fd..c2c166d545 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -1215,6 +1215,7 @@ struct rtl838x_switch_priv {
u64 irq_mask;
u32 fib_entries;
int l2_bucket_size;
+ u16 n_mst;
struct dentry *dbgfs_dir;
/** @lags_port_members: Port (bit) is part of a specific LAG */