• Vivien Didelot's avatar
    net: dsa: mv88e6xxx: fix port egress flooding mode · 601aeed3
    Vivien Didelot authored
    The Marvell switch ports can be configured to allow or prevent egress of
    frames with an unknown unicast or multicast destination address.
    
    Some switch chips such as 88E6095 and 88E6185 have two disjoint bits in
    Port Control Register (0x04) bit 2 "Forward Unknown" (for unicast) and
    Port Control 2 Register (0x08) bit 6 "Default Forward" (for multicast).
    
    Other chips such as 88E6085, 88E6123, 88E6352, and 88E6390 have a 2-bit
    value in Port Control Register (0x04) bits 3:2 "EgressFloods".
    
    The current code does not fully implement the disjoint bits variant and
    assigns incorrect ones to some chip models. Fix that with two
    implementation references (6185 and 6352 that I currently have) of a
    port_set_egress_floods operation (as named in datasheets).
    
    Old chips such as 88E6060 don't have egress flooding mode, so don't
    error out if the operation is not provided.
    Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    601aeed3
port.h 3.58 KB