kernel: b53: fix vlan write for BCM5325 revison 3+
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 15 Sep 2013 13:29:14 +0000 (13:29 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 15 Sep 2013 13:29:14 +0000 (13:29 +0000)
These switches are integrated in some recent BCM53XX and BCM47XX SoCs
like the BCM53572.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 37994

target/linux/generic/files/drivers/net/phy/b53/b53_common.c

index d1fc930f270dcfdc3c121a52a6b965fe94b41a30..4d1e0ee4ba04aecc45c0842a9022d9477ab1a484 100644 (file)
@@ -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 |