Skip to content

Commit e7b1ef2

Browse files
shimodayPaolo Abeni
authored andcommitted
net: renesas: rswitch: Fix unmasking irq condition
Fix unmasking irq condition by using napi_complete_done(). Otherwise, redundant interrupts happen. Fixes: 3590918 ("net: ethernet: renesas: Add support for "Ethernet Switch"") Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent bc6ed2f commit e7b1ef2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/renesas/rswitch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,10 @@ static int rswitch_poll(struct napi_struct *napi, int budget)
816816

817817
netif_wake_subqueue(ndev, 0);
818818

819-
napi_complete(napi);
820-
821-
rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true);
822-
rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true);
819+
if (napi_complete_done(napi, budget - quota)) {
820+
rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true);
821+
rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true);
822+
}
823823

824824
out:
825825
return budget - quota;

0 commit comments

Comments
 (0)