• Heiner Kallweit's avatar
    net: phy: probe PHY drivers synchronously · 16983507
    Heiner Kallweit authored
    If we have scenarios like
    
    mdiobus_register()
    	-> loads PHY driver module(s)
    	-> registers PHY driver(s)
    	-> may schedule async probe
    phydev = mdiobus_get_phy()
    <phydev action involving PHY driver>
    
    or
    
    phydev = phy_device_create()
    	-> loads PHY driver module
    	-> registers PHY driver
    	-> may schedule async probe
    <phydev action involving PHY driver>
    
    then we expect the PHY driver to be bound to the phydev when triggering
    the action. This may not be the case in case of asynchronous probing.
    Therefore ensure that PHY drivers are probed synchronously.
    
    Default still is sync probing, except async probing is explicitly
    requested. I saw some comments that the intention is to promote
    async probing for more parallelism in boot process and want to be
    prepared for the case that the default is changed to async probing.
    Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
    Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    16983507
phy_device.c 69.7 KB