From: Florian Fainelli Date: Fri, 15 Feb 2019 20:16:53 +0000 (-0800) Subject: net: dsa: b53: Do not program CPU port's PVID X-Git-Tag: v4.19.99~435 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4738e916fb3c2f3fdc2a286ede43dc7a7b50132a;p=thirdparty%2Fkernel%2Fstable.git net: dsa: b53: Do not program CPU port's PVID [ Upstream commit 10163aaee9671b01b2f4737922e1a4f43581047a ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 426ec1c05799a..9f21e710fc38b 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1175,7 +1175,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);