• Vincent Whitchurch's avatar
    net: stmmac: only enable DMA interrupts when ready · 087a7b94
    Vincent Whitchurch authored
    In this driver's ->ndo_open() callback, it enables DMA interrupts,
    starts the DMA channels, then requests interrupts with request_irq(),
    and then finally enables napi.
    
    If RX DMA interrupts are received before napi is enabled, no processing
    is done because napi_schedule_prep() will return false.  If the network
    has a lot of broadcast/multicast traffic, then the RX ring could fill up
    completely before napi is enabled.  When this happens, no further RX
    interrupts will be delivered, and the driver will fail to receive any
    packets.
    
    Fix this by only enabling DMA interrupts after all other initialization
    is complete.
    
    Fixes: 523f11b5 ("net: stmmac: move hardware setup for stmmac_open to new function")
    Reported-by: default avatarLars Persson <larper@axis.com>
    Signed-off-by: default avatarVincent Whitchurch <vincent.whitchurch@axis.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    087a7b94
stmmac_main.c 201 KB