Commit 16769a89 authored by Felix Fietkau's avatar Felix Fietkau Committed by David S. Miller

net: ethernet: mtk_eth_soc: reduce unnecessary interrupts

Avoid rearming interrupt if napi_complete returns false
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
Signed-off-by: default avatarIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment