• Andrew Lunn's avatar
    net: dsa: Fix load order between DSA drivers and taggers · 23426a25
    Andrew Lunn authored
    The DSA core, DSA taggers and DSA drivers all make use of
    module_init(). Hence they get initialised at device_initcall() time.
    The ordering is non-deterministic. It can be a DSA driver is bound to
    a device before the needed tag driver has been initialised, resulting
    in the message:
    
    No tagger for this switch
    
    Rather than have this be fatal, return -EPROBE_DEFER so that it is
    tried again later once all the needed drivers have been loaded.
    
    Fixes: d3b8c049 ("dsa: Add boilerplate helper to register DSA tag driver modules")
    Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    23426a25
dsa2.c 17.3 KB