• Russell King's avatar
    net: fec: remove inappropriate calls around fec_restart() · 6af42d42
    Russell King authored
    This is the second stage to "move calls to quiesce/resume packet
    processing out of fec_restart()", where we remove calls which are not
    appropriate to the call site.
    
    In the majority of cases, there is no need to detach and reattach the
    interface as we are holding the queue xmit lock across the reset.  The
    exception to that is in fec_resume(), where we are already detached by
    the suspend function.  Here, we can remove the call to detach the
    interface.
    
    We also do not need to stop the transmit queue.  Holding the xmit lock
    is enough to ensure that the transmit packet processing is not running
    while we perform our task.  However, since fec_restart() always cleans
    the rings, we call netif_wake_queue() (or netif_device_attach() in the
    case of resume) just before dropping the xmit lock.  This prevents the
    watchdog firing.
    
    Lastly, always call napi_enable() after the device has been reattached
    in the resume path so that we know that the transmit packet processing
    is already in an enabled state, so we don't call netif_wake_queue()
    while detached.
    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>
    6af42d42
fec_main.c 70.8 KB