generic: b53: clear SM_SW_FWD_MODE unconditionally when enabling VLAN

Setting this bit stops BCM53125 (bgmac actually) from receiving any
packets. This bit is cleared conditionally in b53_switch_reset and it
seems the same is done in bcmrobo.c which never sets that bit again.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35723 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Jonas Gorski 2013-02-21 11:45:38 +00:00
parent 1dc038ecb4
commit 45d8b5166b
1 changed files with 2 additions and 4 deletions

View File

@ -244,10 +244,9 @@ static void b53_enable_vlan(struct b53_device *dev, int enable)
b53_read8(dev, B53_VLAN_PAGE, B53_VLAN_CTRL5, &vc5); b53_read8(dev, B53_VLAN_PAGE, B53_VLAN_CTRL5, &vc5);
} }
if (enable) { mgmt &= ~SM_SW_FWD_MODE;
if (!is63xx(dev))
mgmt |= SM_SW_FWD_MODE;
if (enable) {
vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID; vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID;
vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN; vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN;
vc4 &= ~VC4_ING_VID_CHECK_MASK; vc4 &= ~VC4_ING_VID_CHECK_MASK;
@ -267,7 +266,6 @@ static void b53_enable_vlan(struct b53_device *dev, int enable)
vc5 &= ~VC5_VID_FFF_EN; vc5 &= ~VC5_VID_FFF_EN;
} }
} else { } else {
mgmt &= ~SM_SW_FWD_MODE;
vc0 &= ~(VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID); vc0 &= ~(VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID);
vc1 &= ~(VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN); vc1 &= ~(VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN);
vc4 &= ~VC4_ING_VID_CHECK_MASK; vc4 &= ~VC4_ING_VID_CHECK_MASK;