netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, andrew@lunn.ch, vivien.didelot@gmail.com,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: [PATCH net 5/5] net: dsa: b53: Do not program CPU port's PVID
Date: Fri, 15 Feb 2019 12:16:53 -0800	[thread overview]
Message-ID: <20190215201653.20988-6-f.fainelli@gmail.com> (raw)
In-Reply-To: <20190215201653.20988-1-f.fainelli@gmail.com>

The CPU port is special and does not need to obey VLAN restrictions as
far as untagged traffic goes, also, having the CPU port be part of a
particular PVID is against the idea of keeping it tagged in all VLANs.

Fixes: ca8931948344 ("net: dsa: b53: Keep CPU port as tagged in all VLANs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/dsa/b53/b53_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 2fef4c564420..c76892ac4e69 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1359,7 +1359,7 @@ void b53_vlan_add(struct dsa_switch *ds, int port,
 		b53_fast_age_vlan(dev, vid);
 	}
 
-	if (pvid) {
+	if (pvid && !dsa_is_cpu_port(ds, port)) {
 		b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_PORT_DEF_TAG(port),
 			    vlan->vid_end);
 		b53_fast_age_vlan(dev, vid);
-- 
2.17.1


  parent reply	other threads:[~2019-02-15 20:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 20:16 [PATCH net 0/5] net: dsa: b53: VLAN and L2 fixes Florian Fainelli
2019-02-15 20:16 ` [PATCH net 1/5] net: dsa: b53: Fix default VLAN ID Florian Fainelli
2019-02-15 20:16 ` [PATCH net 2/5] net: dsa: b53: Properly account for VLAN filtering Florian Fainelli
2019-02-15 20:16 ` [PATCH net 3/5] net: systemport: Fix reception of BPDUs Florian Fainelli
2019-02-15 20:16 ` [PATCH net 4/5] net: dsa: bcm_sf2: Do not assume DSA master supports WoL Florian Fainelli
2019-02-15 20:16 ` Florian Fainelli [this message]
2019-02-16  4:38 ` [PATCH net 0/5] net: dsa: b53: VLAN and L2 fixes David Miller

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=20190215201653.20988-6-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.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).