Skip to content
Commit 087a7b94 authored by Vincent Whitchurch's avatar Vincent Whitchurch Committed by David S. Miller
Browse files

net: stmmac: only enable DMA interrupts when ready



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>
parent dcf4ff7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment