enetc: Fix tx rings bitmap iteration range, irq handling
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Fri, 26 Jun 2020 16:17:29 +0000 (19:17 +0300)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:36:43 +0000 (15:36 -0400)
commitce06fcb6a66d22b080385768113ee28bf3593984
tree2021c46571cc2051444c12a6a3af963b81e92044
parentb90ca32531bf913845a5104689345f9f461f97bb
enetc: Fix tx rings bitmap iteration range, irq handling

[ Upstream commit 0574e2000fc3103cbc69ba82ec1175ce171fdf5e ]

The rings bitmap of an interrupt vector encodes
which of the device's rings were assigned to that
interrupt vector.
Hence the iteration range of the tx rings bitmap
(for_each_set_bit()) should be the total number of
Tx rings of that netdevice instead of the number of
rings assigned to the interrupt vector.
Since there are 2 cores, and one interrupt vector for
each core, the number of rings asigned to an interrupt
vector is half the number of available rings.
The impact of this error is that the upper half of the
tx rings could still generate interrupts during napi
polling.

Fixes: d4fd0404c1c9 ("enetc: Introduce basic PF and VF ENETC ethernet drivers")
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/freescale/enetc/enetc.c