提交 8770e91a 编写于 作者: N Nicolas Ferre 提交者: David S. Miller

net/macb: fix race with RX interrupt while doing NAPI

When interrupts are disabled, an RX condition can occur but
it is not reported when enabling interrupts again. We need to check
RSR and use napi_reschedule() if condition is met.
Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ac574804
......@@ -693,6 +693,11 @@ static int macb_poll(struct napi_struct *napi, int budget)
* get notified when new packets arrive.
*/
macb_writel(bp, IER, MACB_RX_INT_FLAGS);
/* Packets received while interrupts were disabled */
status = macb_readl(bp, RSR);
if (unlikely(status))
napi_reschedule(napi);
}
/* TODO: Handle errors */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册