aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-09-15 13:29:14 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-09-15 13:29:14 +0000
commit593a7b7c77e8f115e7aa19a99ad850d48fad6fe3 (patch)
tree456d874e9a28e78dd616a23da374f593605d50b9 /target/linux/generic
parent1b5c6ae7625bee449998bc4f98951cd263175658 (diff)
downloadupstream-593a7b7c77e8f115e7aa19a99ad850d48fad6fe3.tar.gz
upstream-593a7b7c77e8f115e7aa19a99ad850d48fad6fe3.tar.bz2
upstream-593a7b7c77e8f115e7aa19a99ad850d48fad6fe3.zip
kernel: b53: fix vlan write for BCM5325 revison 3+
These switches are integrated in some recent BCM53XX and BCM47XX SoCs like the BCM53572. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37994 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c9
1 files changed, 7 insertions, 2 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 d1fc930f27..4d1e0ee4ba 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
@@ -188,8 +188,13 @@ static void b53_set_vlan_entry(struct b53_device *dev, u16 vid, u16 members,
if (is5325(dev)) {
u32 entry = 0;
- if (members)
- entry = (untag << VA_UNTAG_S) | members | VA_VALID_25;
+ if (members) {
+ entry = (untag << VA_UNTAG_S) | members;
+ if (dev->core_rev >= 3)
+ entry |= VA_VALID_25_R4 | vid << VA_VID_HIGH_S;
+ else
+ entry |= VA_VALID_25;
+ }
b53_write32(dev, B53_VLAN_PAGE, B53_VLAN_WRITE_25, entry);
b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_TABLE_ACCESS_25, vid |