]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: dsa: b53: fix b53_imp_vlan_setup for BCM5325
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 14 Jun 2025 07:59:59 +0000 (09:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:41:18 +0000 (18:41 +0200)
[ Upstream commit c00df1018791185ea398f78af415a2a0aaa0c79c ]

CPU port should be B53_CPU_PORT instead of B53_CPU_PORT_25 for
B53_PVLAN_PORT_MASK register.

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://patch.msgid.link/20250614080000.1884236-14-noltari@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/b53/b53_common.c

index 184946e8cee9dfe02c31e5e3b6bcec3f7f142f5c..55e1844a5e9c9510331e5b6df01e0ee1d1f040cf 100644 (file)
@@ -529,6 +529,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.