]> 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)
commitca438566c43dfe38f8e11ba3cf38c92b3ff58e17
tree347160a31be5fbdef9021378a1b622e742bf7b0e
parent4e6b6c43be96b10c3ca642761bd3bcd70a18fc77
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: 3c57411dcb27 ("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