summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2023-09-12 10:49:35 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-19 12:30:30 +0200
commit5e93c6044b92bc6bea2211992fdfa9eaa1702f67 (patch)
tree53ca6b08d216e831ace7c21798c669047cef488f
parent0e3ea7e82a06014b9baf1b84ba579c38cbff3558 (diff)
net: renesas: rswitch: Fix unmasking irq condition
[ Upstream commit e7b1ef29420fe52c2c1a273a9b4b36103a522625 ] Fix unmasking irq condition by using napi_complete_done(). Otherwise, redundant interrupts happen. Fixes: 3590918b5d07 ("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>
-rw-r--r--drivers/net/ethernet/renesas/rswitch.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index 4e412ac0965a..449ed1f5624c 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -816,10 +816,10 @@ retry:
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;