]> git.baikalelectronics.ru Git - kernel.git/commit
can: kvaser_usb: Ignore spurious error events after a busoff
authorAhmed S. Darwish <ahmed.darwish@valeo.com>
Mon, 2 Feb 2015 20:15:55 +0000 (15:15 -0500)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 4 Feb 2015 13:07:03 +0000 (14:07 +0100)
commit705994d5fa65f473ef1af7362a861e4c379adf11
tree9469dc573b7cd674b591fc244fc8f5b130642dc4
parent28a67fc310f3f8182bc7d4ecd7e3936688f0f47c
can: kvaser_usb: Ignore spurious error events after a busoff

Sending data in high speed then introducing a busoff results
in spurious BUS_ERROR events from the USBCan-II firmware directly
_after_ the triggered BUS_OFF event.

In the current CAN state handling code, this will lead to an
invalid can state of ACTIVE, ERROR, or PASSIVE even though the
CAN controller has been already shut down due to the busoff.

Guard the state handling code from such invalid events.

Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/kvaser_usb.c