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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Aug 2021 10:47:53 +0000 (12:47 +0200)
commit0e99b794c0bcd08111430bca26cf0d1e2995d048
tree8bad51cc9a519d0780e21f14b6abbfa2971b3454
parentd6892195dfbe4f1bb2f2c15b19540ee46611c9a8
can: mcp251xfd: mcp251xfd_irq(): stop timestamping worker in case error in IRQ

[ Upstream commit ef68a717960658e6a1e5f08adb0574326e9a12c2 ]

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: efd8d98dfb90 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c