diff options
| author | Markus Stockhausen | 2026-02-17 18:19:22 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2026-02-21 19:33:28 +0000 |
| commit | 75c772899c7a655b658577f63f3777ded2568890 (patch) | |
| tree | fd31d7bf6ed99086d920a2bff6fd257ba26fa1b7 | |
| parent | 9a0bd2d1aabebb0845a8761929677561ea9fa44d (diff) | |
| download | openwrt-75c772899c7a655b658577f63f3777ded2568890.tar.gz | |
realtek: dsa: derive dsa port count and irq mask from cpu port
Avoid a family_id check and derive the values from the cpu port.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22068
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c | 10 |
1 files changed, 2 insertions, 8 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 0a23329778..23a37f2bcd 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 @@ -1411,8 +1411,6 @@ static int rtl83xx_sw_probe(struct platform_device *pdev) priv->cpu_port = RTL838X_CPU_PORT; priv->port_mask = 0x1f; priv->port_width = 1; - priv->irq_mask = 0x0FFFFFFF; - priv->ds->num_ports = RTL838X_CPU_PORT + 1; priv->fib_entries = 8192; priv->ds->num_lag_ids = 8; priv->l2_bucket_size = 4; @@ -1423,8 +1421,6 @@ static int rtl83xx_sw_probe(struct platform_device *pdev) priv->cpu_port = RTL839X_CPU_PORT; priv->port_mask = 0x3f; priv->port_width = 2; - priv->irq_mask = 0xFFFFFFFFFFFFFULL; - priv->ds->num_ports = RTL839X_CPU_PORT + 1; priv->fib_entries = 16384; priv->ds->num_lag_ids = 16; priv->l2_bucket_size = 4; @@ -1435,8 +1431,6 @@ static int rtl83xx_sw_probe(struct platform_device *pdev) priv->cpu_port = RTL930X_CPU_PORT; priv->port_mask = 0x1f; priv->port_width = 1; - priv->irq_mask = 0x0FFFFFFF; - priv->ds->num_ports = RTL930X_CPU_PORT + 1; priv->fib_entries = 16384; priv->ds->num_lag_ids = 16; sw_w32(0, RTL930X_ST_CTRL); @@ -1448,8 +1442,6 @@ static int rtl83xx_sw_probe(struct platform_device *pdev) priv->cpu_port = RTL931X_CPU_PORT; priv->port_mask = 0x3f; priv->port_width = 2; - priv->irq_mask = GENMASK_ULL(priv->cpu_port - 1, 0); - priv->ds->num_ports = RTL931X_CPU_PORT + 1; priv->fib_entries = 16384; priv->ds->num_lag_ids = 16; sw_w32(0, RTL931x_ST_CTRL); @@ -1457,6 +1449,8 @@ static int rtl83xx_sw_probe(struct platform_device *pdev) priv->n_mst = 128; break; } + priv->ds->num_ports = priv->cpu_port + 1; + priv->irq_mask = GENMASK_ULL(priv->cpu_port - 1, 0); err = rtl83xx_mdio_probe(priv); if (err) { |