• Russell King's avatar
    net: fec: stop the phy before shutting down the MAC · d76cfae9
    Russell King authored
    When the network interface goes down, stop the phy to prevent further
    link up status changes before taking the MAC or netif sections down.
    This prevents further reception of link up events which could
    potentially call fec_restart().
    
    Since phy_stop() takes the mutex which adjust_link() runs under, we
    also ensure that adjust_link() will not already be processing a link
    up event.
    
    We also need to do this when suspending as well - we don't want a
    mis-timed phy state change to restart the MAC after we have stopped
    it for suspend, and thus need to restart the phy when resuming.
    Acked-by: default avatarFugang Duan <B38611@freescale.com>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d76cfae9
fec_main.c 69.9 KB