]> git.baikalelectronics.ru Git - kernel.git/commit
can: flexcan: handle state passive -> warning transition
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 25 Jul 2014 18:16:40 +0000 (20:16 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 21 Aug 2014 08:50:00 +0000 (10:50 +0200)
commit3f2bb40a3f95b66c6a6096a9a93e524ace23286f
tree6e03a19648f7b073d73d7dae621136631414923c
parent1611bac0e57a51fd8d46384aabb475913ab8c09f
can: flexcan: handle state passive -> warning transition

Once the CAN-bus is open and a packet is sent, the controller switches
into the PASSIVE state. Once the BUS is closed again it goes the back
err-warning. The TX error counter goes 0 -> 0x80 -> 0x7f.
This patch makes sure that the user learns about this state chang
(CAN_STATE_ERROR_WARNING => CAN_STATE_ERROR_PASSIVE)

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Matthias Klein <matthias.klein@optimeas.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c