]> git.baikalelectronics.ru Git - kernel.git/commit
can: c_can: c_can_poll(): only read status register after status IRQ
authorKurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Tue, 1 Oct 2019 07:40:36 +0000 (09:40 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:21 +0000 (21:47 +0100)
commit320d606972289a5a56305226dd2e27e99f0b2f2a
tree347160a31be5fbdef9021378a1b622e742bf7b0e
parentf0cec87554c2c3e1974237381c2b22803d25ad70
can: c_can: c_can_poll(): only read status register after status IRQ

When the status register is read without the status IRQ pending, the
chip may not raise the interrupt line for an upcoming status interrupt
and the driver may miss a status interrupt.

It is critical that the BUSOFF status interrupt is forwarded to the
higher layers, since no more interrupts will follow without
intervention.

Thanks to Wolfgang and Joe for bringing up the first idea.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Joe Burmeister <joe.burmeister@devtank.co.uk>
Fixes: dc053c3648ce ("can: c_can: Get rid of pointless interrupts")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c
drivers/net/can/c_can/c_can.h