• Vincent Palatin's avatar
    stmmac: do not sleep in atomic context for mdio_reset · f55d84b0
    Vincent Palatin authored
    stmmac_mdio_reset() has been updated to use msleep rather udelay
    (as some PHY requires a one second delay there).
    It called from stmmac_resume() within the spin_lock_irqsave block
    atomic context triggering 'scheduling while atomic'.
    
    The stmmac_priv lock usage is not fully documented, but it seems
    to protect the access to the MAC registers / DMA structures rather
    than the MDIO bus or the PHY (which have separate locking),
    so we can push the spin_lock after the stmmac_mdio_reset call.
    Signed-off-by: default avatarVincent Palatin <vpalatin@chromium.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f55d84b0
stmmac_main.c 98.2 KB