[PATCH net-next v3 13/14] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325

Álvaro Fernández Rojas posted 14 patches 4 months ago
There is a newer version of this series
[PATCH net-next v3 13/14] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325
Posted by Álvaro Fernández Rojas 4 months ago
CPU port should be B53_CPU_PORT instead of B53_CPU_PORT_25 for
B53_PVLAN_PORT_MASK register.

Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 4 ++++
 1 file changed, 4 insertions(+)

 v3: no changes

 v2: no changes

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 409336d380bcf..3503f363e2419 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -543,6 +543,10 @@ void b53_imp_vlan_setup(struct dsa_switch *ds, int cpu_port)
 	unsigned int i;
 	u16 pvlan;
 
+	/* BCM5325 CPU port is at 8 */
+	if ((is5325(dev) || is5365(dev)) && cpu_port == B53_CPU_PORT_25)
+		cpu_port = B53_CPU_PORT;
+
 	/* Enable the IMP port to be in the same VLAN as the other ports
 	 * on a per-port basis such that we only have Port i and IMP in
 	 * the same VLAN.
-- 
2.39.5

Re: [PATCH net-next v3 13/14] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325
Posted by Florian Fainelli 4 months ago
On 6/12/25 01:37, Álvaro Fernández Rojas wrote:
> CPU port should be B53_CPU_PORT instead of B53_CPU_PORT_25 for
> B53_PVLAN_PORT_MASK register.
> 
> Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support")
> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian