Changeset 38793


Ignore:
Timestamp:
2013-11-13T19:04:39+01:00 (4 years ago)
Author:
hauke
Message:

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@…>

Location:
trunk/target/linux/generic/files/drivers/net/phy/b53
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/net/phy/b53/b53_common.c

    r38712 r38793  
    190190 
    191191                if (members) { 
    192                         entry = (untag << VA_UNTAG_S) | members; 
     192                        entry = ((untag & VA_UNTAG_MASK_25) << VA_UNTAG_S_25) | 
     193                                members; 
    193194                        if (dev->core_rev >= 3) 
    194195                                entry |= VA_VALID_25_R4 | vid << VA_VID_HIGH_S; 
     
    204205 
    205206                if (members) 
    206                         entry = (untag << VA_UNTAG_S) | members | VA_VALID_65; 
     207                        entry = ((untag & VA_UNTAG_MASK_65) << VA_UNTAG_S_65) | 
     208                                members | VA_VALID_65; 
    207209 
    208210                b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_WRITE_65, entry); 
  • trunk/target/linux/generic/files/drivers/net/phy/b53/b53_regs.h

    r37995 r38793  
    283283#define B53_VLAN_READ                   0x0c 
    284284#define   VA_MEMBER_MASK                0x3f 
    285 #define   VA_UNTAG_S                    6 
    286 #define   VA_UNTAG_MASK                 (0x3f << VA_UNTAG_S) 
     285#define   VA_UNTAG_S_25                 6 
     286#define   VA_UNTAG_MASK_25              0x3f 
     287#define   VA_UNTAG_S_65                 7 
     288#define   VA_UNTAG_MASK_65              0x1f 
    287289#define   VA_VID_HIGH_S                 12 
    288290#define   VA_VID_HIGH_MASK              (0xffff << VA_VID_HIGH_S) 
Note: See TracChangeset for help on using the changeset viewer.