• MD Danish Anwar's avatar
    net: ti: icssg-prueth: Add support for ICSSG switch firmware · abd5576b
    MD Danish Anwar authored
    Add support for ICSSG switch firmware using existing Dual EMAC driver
    with switchdev.
    
    Limitations:
    VLAN offloading is limited to 0-256 IDs.
    MDB/FDB static entries are limited to 511 entries and different FDBs can
    hash to same bucket and thus may not completely offloaded
    
    Example assuming ETH1 and ETH2 as ICSSG2 interfaces:
    
    Switch to ICSSG Switch mode:
     ip link add name br0 type bridge
     ip link set dev eth1 master br0
     ip link set dev eth2 master br0
     ip link set dev br0 up
     bridge vlan add dev br0 vid 1 pvid untagged self
    
    Going back to Dual EMAC mode:
    
     ip link set dev br0 down
     ip link set dev eth1 nomaster
     ip link set dev eth2 nomaster
     ip link del name br0 type bridge
    
    By default, Dual EMAC firmware is loaded, and can be changed to switch
    mode by above steps
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarMD Danish Anwar <danishanwar@ti.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    abd5576b
icssg_common.c 31.1 KB