• Vivien Didelot's avatar
    net: dsa: do not enable or disable non user ports · 74be4bab
    Vivien Didelot authored
    The .port_enable and .port_disable operations are currently only
    called for user ports, hence assuming they have a slave device. In
    preparation for using these operations for other port types as well,
    simply guard all implementations against non user ports and return
    directly in such case.
    
    Note that bcm_sf2_sw_suspend() currently calls bcm_sf2_port_disable()
    (and thus b53_disable_port()) against the user and CPU ports, so do
    not guards those functions. They will be called for unused ports in
    the future, but that was expected by those drivers anyway.
    Signed-off-by: default avatarVivien Didelot <vivien.didelot@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    74be4bab
b53_common.c 60.4 KB