openwrt-6.x/target/linux/generic/backport-6.12/613-07-v6.19-net-dsa-b53-allow-VID-0-for-BCM5325-65.patch
Álvaro Fernández Rojas 4814636b9b generic: 6.12: backport b53 fixes for BCM5325
Replace pending b53 fixes patches with the accepted ones from net-next for
linux v6.19.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-12-04 19:29:54 +01:00

45 lines
1.6 KiB
Diff

From 0b2b27058692d437b12d3f2a3bf0fa699af7376e Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jonas.gorski@gmail.com>
Date: Fri, 28 Nov 2025 09:06:25 +0100
Subject: [PATCH] net: dsa: b53: allow VID 0 for BCM5325/65
Now that writing ARL entries works properly, we can actually use VID 0
as the default untagged VLAN for BCM5325 and BCM5365 as well.
So use 0 as default PVID for all chips and do not reject VLAN 0 anymore,
which we ignored since commit 45e9d59d3950 ("net: dsa: b53: do not allow
to configure VLAN 0") anyway.
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20251128080625.27181-8-jonas.gorski@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/dsa/b53/b53_common.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -852,10 +852,7 @@ static void b53_enable_stp(struct b53_de
static u16 b53_default_pvid(struct b53_device *dev)
{
- if (is5325(dev) || is5365(dev))
- return 1;
- else
- return 0;
+ return 0;
}
static bool b53_vlan_port_needs_forced_tagged(struct dsa_switch *ds, int port)
@@ -1679,9 +1676,6 @@ static int b53_vlan_prepare(struct dsa_s
{
struct b53_device *dev = ds->priv;
- if ((is5325(dev) || is5365(dev)) && vlan->vid == 0)
- return -EOPNOTSUPP;
-
/* Port 7 on 7278 connects to the ASP's UniMAC which is not capable of
* receiving VLAN tagged frames at all, we can still allow the port to
* be configured for egress untagged.