• Vladimir Oltean's avatar
    net: dsa: first set up shared ports, then non-shared ports · 1e3f407f
    Vladimir Oltean authored
    After commit a57d8c21 ("net: dsa: flush switchdev workqueue before
    tearing down CPU/DSA ports"), the port setup and teardown procedure
    became asymmetric.
    
    The fact of the matter is that user ports need the shared ports to be up
    before they can be used for CPU-initiated termination. And since we
    register net devices for the user ports, those won't be functional until
    we also call the setup for the shared (CPU, DSA) ports. But we may do
    that later, depending on the port numbering scheme of the hardware we
    are dealing with.
    
    It just makes sense that all shared ports are brought up before any user
    port is. I can't pinpoint any issue due to the current behavior, but
    let's change it nonetheless, for consistency's sake.
    Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1e3f407f
dsa2.c 39.3 KB