]> git.baikalelectronics.ru Git - kernel.git/commit
can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq...
authorFlorian Faber <faber@faberman.de>
Thu, 26 Dec 2019 18:51:24 +0000 (19:51 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 2 Jan 2020 14:34:27 +0000 (15:34 +0100)
commit78564c00f14e5c20bfa07537b39f5fbd2fe08f8a
tree3c9174f7b842f319caa88824268ee4a971fe4c81
parent97e04fddcceb9fc815c7c874521330d58ccd9418
can: mscan: mscan_rx_poll(): fix rx path lockup when returning from polling to irq mode

Under load, the RX side of the mscan driver can get stuck while TX still
works. Restarting the interface locks up the system. This behaviour
could be reproduced reliably on a MPC5121e based system.

The patch fixes the return value of the NAPI polling function (should be
the number of processed packets, not constant 1) and the condition under
which IRQs are enabled again after polling is finished.

With this patch, no more lockups were observed over a test period of ten
days.

Fixes: 69eac5f37619 ("net/can: add driver for mscan family & mpc52xx_mscan")
Signed-off-by: Florian Faber <faber@faberman.de>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/mscan/mscan.c