aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-02-21 11:45:38 +0000
committerJonas Gorski <jogo@openwrt.org>2013-02-21 11:45:38 +0000
commit3010a0b6166c9c73ea9582b781d6e6e3c99635f5 (patch)
treef823256107ab53137054f06ef2e3eeb789d7dd8c
parent23e71c56ba63d7e8e796e2fa17ab1a454650d392 (diff)
downloadupstream-3010a0b6166c9c73ea9582b781d6e6e3c99635f5.tar.gz
upstream-3010a0b6166c9c73ea9582b781d6e6e3c99635f5.tar.bz2
upstream-3010a0b6166c9c73ea9582b781d6e6e3c99635f5.zip
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> SVN-Revision: 35723
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
index 923d1555d1..41e6fa9881 100644
--- a/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
+++ b/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
@@ -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);
}
- if (enable) {
- if (!is63xx(dev))
- mgmt |= SM_SW_FWD_MODE;
+ mgmt &= ~SM_SW_FWD_MODE;
+ if (enable) {
vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID;
vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN;
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;
}
} else {
- mgmt &= ~SM_SW_FWD_MODE;
vc0 &= ~(VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID);
vc1 &= ~(VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN);
vc4 &= ~VC4_ING_VID_CHECK_MASK;