Merge patch series "can: dev: fix can_restart() and replace BUG_ON() by error handling"
Marc Kleine-Budde <mkl@pengutronix.de> says:
There are 2 BUG_ON() in the CAN dev helpers. During the update/test of
the at91_can driver to rx-offload the one in can_restart() was
triggered, due to a race condition in can_restart() and a hardware
limitation of the at91_can IP core.
This series fixes the race condition, replaces BUG_ON() with an error
message, and does some cleanup. Finally, the BUG_ON() in
can_put_echo_skb() is also replaced with error handling.
Changes in v2:
- 4/5: move "Restarted" debug message and stats after successful restart (Thanks Vincent)
- Link to v1: https://lore.kernel.org/all/
20231004-can-dev-fix-can-restart-v1-0-
2e52899eaaf5@pengutronix.de
Link: https://lore.kernel.org/all/20231005-can-dev-fix-can-restart-v2-0-91b5c1fd922c@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>