Skip to content

Commit 36355dd

Browse files
KanjiMonsterkuba-moo
authored andcommitted
net: b53: enable BPDU reception for management port
For STP to work, receiving BPDUs is essential, but the appropriate bit was never set. Without GC_RX_BPDU_EN, the switch chip will filter all BPDUs, even if an appropriate PVID VLAN was setup. Fixes: ff39c2d ("net: dsa: b53: Add bridge support") Signed-off-by: Jonas Gorski <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent ff62b79 commit 36355dd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/net/dsa/b53/b53_common.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,15 @@ static void b53_enable_mib(struct b53_device *dev)
737737
b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc);
738738
}
739739

740+
static void b53_enable_stp(struct b53_device *dev)
741+
{
742+
u8 gc;
743+
744+
b53_read8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, &gc);
745+
gc |= GC_RX_BPDU_EN;
746+
b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, gc);
747+
}
748+
740749
static u16 b53_default_pvid(struct b53_device *dev)
741750
{
742751
if (is5325(dev) || is5365(dev))
@@ -876,6 +885,7 @@ static int b53_switch_reset(struct b53_device *dev)
876885
}
877886

878887
b53_enable_mib(dev);
888+
b53_enable_stp(dev);
879889

880890
return b53_flush_arl(dev, FAST_AGE_STATIC);
881891
}

0 commit comments

Comments
 (0)