]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: dsa: b53: b53_arl_rw_op() needs to select IVL or SVL
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 21 Apr 2020 03:26:55 +0000 (20:26 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 May 2020 08:54:22 +0000 (10:54 +0200)
BugLink: https://bugs.launchpad.net/bugs/1877461
[ Upstream commit 64fec9493f7dc9bdd7233bcfe98985c45bd0e3c1 ]

Flip the IVL_SVL_SELECT bit correctly based on the VLAN enable status,
the default is to perform Shared VLAN learning instead of Individual
learning.

Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/dsa/b53/b53_common.c
drivers/net/dsa/b53/b53_regs.h

index 6c79af8046ba97ea91236e8f456615f4b6e54386..61d6551fbed17f8473f91851893b82fe2c601eef 100644 (file)
@@ -1209,6 +1209,10 @@ static int b53_arl_rw_op(struct b53_device *dev, unsigned int op)
                reg |= ARLTBL_RW;
        else
                reg &= ~ARLTBL_RW;
+       if (dev->vlan_enabled)
+               reg &= ~ARLTBL_IVL_SVL_SELECT;
+       else
+               reg |= ARLTBL_IVL_SVL_SELECT;
        b53_write8(dev, B53_ARLIO_PAGE, B53_ARLTBL_RW_CTRL, reg);
 
        return b53_arl_op_wait(dev);
index 14f617e9173dff34e739d267790cc46e1d991c40..c90985c294a2e72888229963b89174e01bb6a978 100644 (file)
 /* ARL Table Read/Write Register (8 bit) */
 #define B53_ARLTBL_RW_CTRL             0x00
 #define    ARLTBL_RW                   BIT(0)
+#define    ARLTBL_IVL_SVL_SELECT       BIT(6)
 #define    ARLTBL_START_DONE           BIT(7)
 
 /* MAC Address Index Register (48 bit) */