Skip to content

Commit 64fec94

Browse files
ffainellidavem330
authored andcommitted
net: dsa: b53: b53_arl_rw_op() needs to select IVL or SVL
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: 1da6df8 ("net: dsa: b53: Implement ARL add/del/dump operations") Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6344dbd commit 64fec94

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,10 @@ static int b53_arl_rw_op(struct b53_device *dev, unsigned int op)
14741474
reg |= ARLTBL_RW;
14751475
else
14761476
reg &= ~ARLTBL_RW;
1477+
if (dev->vlan_enabled)
1478+
reg &= ~ARLTBL_IVL_SVL_SELECT;
1479+
else
1480+
reg |= ARLTBL_IVL_SVL_SELECT;
14771481
b53_write8(dev, B53_ARLIO_PAGE, B53_ARLTBL_RW_CTRL, reg);
14781482

14791483
return b53_arl_op_wait(dev);

drivers/net/dsa/b53/b53_regs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@
292292
/* ARL Table Read/Write Register (8 bit) */
293293
#define B53_ARLTBL_RW_CTRL 0x00
294294
#define ARLTBL_RW BIT(0)
295+
#define ARLTBL_IVL_SVL_SELECT BIT(6)
295296
#define ARLTBL_START_DONE BIT(7)
296297

297298
/* MAC Address Index Register (48 bit) */

0 commit comments

Comments
 (0)