net: mvpp2: fix interrupt mask/unmask skip condition
authorSasha Levin <sashal@kernel.org>
Wed, 31 Mar 2021 23:11:09 +0000 (19:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 13:00:07 +0000 (15:00 +0200)
commit8fe47a33944fc1d9ff88ccc8d60c5571b7e072f8
tree590a88e969e3e9451c2dbc5d61c57f6b2c4c45d0
parent44c816c8b9ab3296d56cfd0a75975b1fe41186d7
net: mvpp2: fix interrupt mask/unmask skip condition

[ Upstream commit 7867299cde34e9c2d2c676f2a384a9d5853b914d ]

The condition should be skipped if CPU ID equal to nthreads.
The patch doesn't fix any actual issue since
nthreads = min_t(unsigned int, num_present_cpus(), MVPP2_MAX_THREADS).
On all current Armada platforms, the number of CPU's is
less than MVPP2_MAX_THREADS.

Fixes: e531f76757eb ("net: mvpp2: handle cases where more CPUs are available than s/w threads")
Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c