提交 16769a89 编写于 作者: F Felix Fietkau 提交者: David S. Miller

net: ethernet: mtk_eth_soc: reduce unnecessary interrupts

Avoid rearming interrupt if napi_complete returns false
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
Signed-off-by: NIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 816ac3e6
......@@ -1519,8 +1519,8 @@ static int mtk_napi_tx(struct napi_struct *napi, int budget)
if (status & MTK_TX_DONE_INT)
return budget;
napi_complete(napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
if (napi_complete(napi))
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
return tx_done;
}
......@@ -1553,8 +1553,9 @@ static int mtk_napi_rx(struct napi_struct *napi, int budget)
remain_budget -= rx_done;
goto poll_again;
}
napi_complete(napi);
mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
if (napi_complete(napi))
mtk_rx_irq_enable(eth, MTK_RX_DONE_INT);
return rx_done + budget - remain_budget;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册