]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: xilinx_can: fix recovery from error states not being propagated
authorAnssi Hannula <anssi.hannula@bitwise.fi>
Wed, 8 Feb 2017 11:13:40 +0000 (13:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Jul 2018 05:57:18 +0000 (07:57 +0200)
commit03145be6c4f3fd923774a73d11c7543613122191
tree72ca8b0b59bfa93ef426b5b75cb5ee4155f9488c
parent56d8607730c355bf7ad42b45059f94182405e079
can: xilinx_can: fix recovery from error states not being propagated

commit 877e0b75947e2c7acf5624331bb17ceb093c98ae upstream.

The xilinx_can driver contains no mechanism for propagating recovery
from CAN_STATE_ERROR_WARNING and CAN_STATE_ERROR_PASSIVE.

Add such a mechanism by factoring the handling of
XCAN_STATE_ERROR_PASSIVE and XCAN_STATE_ERROR_WARNING out of
xcan_err_interrupt and checking for recovery after RX and TX if the
interface is in one of those states.

Tested with the integrated CAN on Zynq-7000 SoC.

Fixes: b1201e44f50b ("can: xilinx CAN controller support")
Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/xilinx_can.c