net: renesas: rswitch: Add spin lock protection for irq {un}mask
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tue, 12 Sep 2023 01:49:36 +0000 (10:49 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 Sep 2023 08:26:41 +0000 (10:26 +0200)
commitc4f922e86c8e0f7c5fe94e0547e9835fc9711f08
tree3ca8ecc2d5958742f08623dec337a479a4019e2f
parente7b1ef29420fe52c2c1a273a9b4b36103a522625
net: renesas: rswitch: Add spin lock protection for irq {un}mask

Add spin lock protection for irq {un}mask registers' control.

After napi_complete_done() and this protection were applied,
a lot of redundant interrupts no longer occur.

For example: when "iperf3 -c <ipaddr> -R" on R-Car S4-8 Spider
 Before the patches are applied: about 800,000 times happened
 After the patches were applied: about 100,000 times happened

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>
drivers/net/ethernet/renesas/rswitch.c
drivers/net/ethernet/renesas/rswitch.h