aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/b53/b53_common.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-11-13 18:04:39 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-11-13 18:04:39 +0000
commit0cdab0237da84284054f63897e8e094d47f13bf1 (patch)
tree4c918a42edce1944402cbac1dd94351a33d88c75 /target/linux/generic/files/drivers/net/phy/b53/b53_common.c
parent736db5f17ceb5e1f8cf803c236d90e0250c003d7 (diff)
downloadupstream-0cdab0237da84284054f63897e8e094d47f13bf1.tar.gz
upstream-0cdab0237da84284054f63897e8e094d47f13bf1.tar.bz2
upstream-0cdab0237da84284054f63897e8e094d47f13bf1.zip
kernel: b53: fix untagged shift for BCM5365
The BCM5365 needs a shift of 7 bits and not 6 bits like the BCM5325 for the untagged ports. Thank you Russell for reporting this and testing the patch. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 38793
Diffstat (limited to 'target/linux/generic/files/drivers/net/phy/b53/b53_common.c')
-rw-r--r--target/linux/generic/files/drivers/net/phy/b53/b53_common.c6
1 files changed, 4 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 39027c1771..f5dd068a1b 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
@@ -189,7 +189,8 @@ static void b53_set_vlan_entry(struct b53_device *dev, u16 vid, u16 members,
u32 entry = 0;
if (members) {
- entry = (untag << VA_UNTAG_S) | members;
+ entry = ((untag & VA_UNTAG_MASK_25) << VA_UNTAG_S_25) |
+ members;
if (dev->core_rev >= 3)
entry |= VA_VALID_25_R4 | vid << VA_VID_HIGH_S;
else
@@ -203,7 +204,8 @@ static void b53_set_vlan_entry(struct b53_device *dev, u16 vid, u16 members,
u16 entry = 0;
if (members)
- entry = (untag << VA_UNTAG_S) | members | VA_VALID_65;
+ entry = ((untag & VA_UNTAG_MASK_65) << VA_UNTAG_S_65) |
+ members | VA_VALID_65;
b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_WRITE_65, entry);
b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_TABLE_ACCESS_65, vid |