]> git.baikalelectronics.ru Git - kernel.git/commit
can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 24 Apr 2021 14:20:39 +0000 (16:20 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 24 Jul 2021 17:02:32 +0000 (19:02 +0200)
commit666965f1856ed71655684cfcde70c7d7a817dbfe
tree8a701cbb221058e6f063c65fda661000f99b51cf
parent99439fbaa81ecaee2d4ad79cd052e6d1b32f288f
can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ

In case an error occurred in the IRQ handler, the chip status is
dumped via devcoredump and all IRQs are disabled, but the chip stays
powered for further analysis.

The chip is in an undefined state and will not receive any CAN frames,
so shut down the timestamping worker, which reads the TBC register
regularly, too. This avoids any CRC read error messages if there is a
communication problem with the chip.

Fixes: 92226532ee23 ("can: mcp251xfd: add HW timestamp infrastructure")
Link: https://lore.kernel.org/r/20210724155131.471303-1-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c