lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 202/639] net: dsa: b53: Do not program CPU ports PVID
    Date
    From: Florian Fainelli <f.fainelli@gmail.com>

    [ 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 <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 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);
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-01-24 12:43    [W:2.068 / U:1.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site