]> git.itanic.dy.fi Git - linux-stable/commit
can: at91_can: at91_irq_err_line(): make use of can_change_state() and can_bus_off()
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 1 May 2023 16:14:41 +0000 (18:14 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 5 Oct 2023 19:47:28 +0000 (21:47 +0200)
commit9df2faf947bc4e7a48dbd7768ccb95337bb12c44
tree1a85e7774d6675dfa8bc2e2151d93f2b279ae1d6
parentf13e86993d85ac98b12159ca9e31dc0357e5a926
can: at91_can: at91_irq_err_line(): make use of can_change_state() and can_bus_off()

The driver implements a hand crafted CAN state handling. Update the
driver to make use of can_change_state(), introduced in ("can: dev:
Consolidate and unify state change handling")

Also switch from hand crafted CAN bus off handling to can_bus_off():
In case of a bus off, abort all pending TX requests, switch off the
device and let can_bus_off() handle the device restart.

Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-24-9987d53600e0@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/at91_can.c