Skip to content

Commit e54b4db

Browse files
laeyraudkuba-moo
authored andcommitted
net: ethernet: mtk-star-emac: rearm interrupts in rx_poll only when advised
In mtk_star_rx_poll function, on event processing completion, the mtk_star_emac driver calls napi_complete_done but ignores its return code and enable RX DMA interrupts inconditionally. This return code gives the info if a device should avoid rearming its interrupts or not, so fix this behaviour by taking it into account. Fixes: 8c7bd5a ("net: ethernet: mtk-star-emac: new driver") Signed-off-by: Louis-Alexis Eyraud <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://patch.msgid.link/20250424-mtk_star_emac-fix-spinlock-recursion-issue-v2-2-f3fde2e529d8@collabora.com Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 6fe0866 commit e54b4db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/mediatek/mtk_star_emac.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,8 +1348,7 @@ static int mtk_star_rx_poll(struct napi_struct *napi, int budget)
13481348
priv = container_of(napi, struct mtk_star_priv, rx_napi);
13491349

13501350
work_done = mtk_star_rx(priv, budget);
1351-
if (work_done < budget) {
1352-
napi_complete_done(napi, work_done);
1351+
if (work_done < budget && napi_complete_done(napi, work_done)) {
13531352
spin_lock_irqsave(&priv->lock, flags);
13541353
mtk_star_enable_dma_irq(priv, true, false);
13551354
spin_unlock_irqrestore(&priv->lock, flags);

0 commit comments

Comments
 (0)