netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Gorski <jonas.gorski@gmail.com>
To: "Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Álvaro Fernández Rojas" <noltari@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 7/7] net: dsa: b53: allow VID 0 for BCM5325/65
Date: Fri, 28 Nov 2025 09:06:25 +0100	[thread overview]
Message-ID: <20251128080625.27181-8-jonas.gorski@gmail.com> (raw)
In-Reply-To: <20251128080625.27181-1-jonas.gorski@gmail.com>

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>
---
 * just let b53_default_pvid() return 0 instead of replacing its call
   everywhere
 * drop the explicit rejection of VID 0 for bcm5325/65
 * reword and expand the commit message a bit

 drivers/net/dsa/b53/b53_common.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index ac995f36ed95..a1a177713d99 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -872,10 +872,7 @@ static void b53_enable_stp(struct b53_device *dev)
 
 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)
@@ -1699,9 +1696,6 @@ static int b53_vlan_prepare(struct dsa_switch *ds, int port,
 {
 	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.
-- 
2.43.0


  parent reply	other threads:[~2025-11-28  8:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28  8:06 [PATCH net-next v2 0/7] net: dsa: b53: fix ARL accesses for BCM5325/65 and allow VID 0 Jonas Gorski
2025-11-28  8:06 ` [PATCH net-next v2 1/7] net: dsa: b53: fix VLAN_ID_IDX write size for BCM5325/65 Jonas Gorski
2025-11-28  8:06 ` [PATCH net-next v2 2/7] net: dsa: b53: fix extracting VID from entry " Jonas Gorski
2025-11-28  8:06 ` [PATCH net-next v2 3/7] net: dsa: b53: use same ARL search result offset " Jonas Gorski
2025-11-28  8:06 ` [PATCH net-next v2 4/7] net: dsa: b53: fix CPU port unicast ARL entries " Jonas Gorski
2025-12-01  1:29   ` Florian Fainelli
2025-11-28  8:06 ` [PATCH net-next v2 5/7] net: dsa: b53: fix BCM5325/65 ARL entry multicast port masks Jonas Gorski
2025-11-28  8:06 ` [PATCH net-next v2 6/7] net: dsa: b53: fix BCM5325/65 ARL entry VIDs Jonas Gorski
2025-12-01  1:30   ` Florian Fainelli
2025-11-28  8:06 ` Jonas Gorski [this message]
2025-12-01  1:31   ` [PATCH net-next v2 7/7] net: dsa: b53: allow VID 0 for BCM5325/65 Florian Fainelli
2025-12-01 22:50 ` [PATCH net-next v2 0/7] net: dsa: b53: fix ARL accesses for BCM5325/65 and allow VID 0 patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251128080625.27181-8-jonas.gorski@gmail.com \
    --to=jonas.gorski@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noltari@gmail.com \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).