Skip to content

Commit

Permalink
net: renesas: rswitch: Fix unmasking irq condition
Browse files Browse the repository at this point in the history
[ Upstream commit e7b1ef2 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
shimoday authored and gregkh committed Sep 19, 2023
1 parent 0e3ea7e commit 5e93c60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/renesas/rswitch.c
Expand Up @@ -816,10 +816,10 @@ static int rswitch_poll(struct napi_struct *napi, int budget)

netif_wake_subqueue(ndev, 0);

napi_complete(napi);

rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true);
rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true);
if (napi_complete_done(napi, budget - quota)) {
rswitch_enadis_data_irq(priv, rdev->tx_queue->index, true);
rswitch_enadis_data_irq(priv, rdev->rx_queue->index, true);
}

out:
return budget - quota;
Expand Down

0 comments on commit 5e93c60

Please sign in to comment.