net: mvpp2: fix a txq_done race condition
authorAntoine Tenart <antoine.tenart@bootlin.com>
Tue, 18 Sep 2018 14:58:47 +0000 (16:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:16:18 +0000 (09:16 +0200)
commit85ebbc5a2543f3ffcc535dbeb9842af542f3edb1
treeee2435e87d28a4888fd298c444e5463d7634d660
parentd9bf6699aee863044cbb8c2b5d2de5e1db4fd7d8
net: mvpp2: fix a txq_done race condition

[ Upstream commit 774268f3e51b53ed432a1ec516574fd5ba469398 ]

When no Tx IRQ is available, the txq_done() routine (called from
tx_done()) shouldn't be called from the polling function, as in such
case it is already called in the Tx path thanks to an hrtimer. This
mostly occurred when using PPv2.1, as the engine then do not have Tx
IRQs.

Fixes: edc660fa09e2 ("net: mvpp2: replace TX coalescing interrupts with hrtimer")
Reported-by: Stefan Chulski <stefanc@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/mvpp2.c