diff options
author | Ahmed S. Darwish <ahmed.darwish@valeo.com> | 2015-01-26 07:25:43 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-05 22:35:36 -0800 |
commit | cd99ca324e0943f47ea404ae088a6b553b74f4f2 (patch) | |
tree | 6f11a1ae36040e547a96192249c250ab9054ed81 /drivers/leds | |
parent | 7d5c90471fd3b7f51877665c2ba9987acd64b100 (diff) |
can: kvaser_usb: Fix state handling upon BUS_ERROR events
commit e638642b08c170d2021b706f0b1c4f4ae93d8cbd upstream.
While being in an ERROR_WARNING state, and receiving further
bus error events with error counters still in the ERROR_WARNING
range of 97-127 inclusive, the state handling code erroneously
reverts back to ERROR_ACTIVE.
Per the CAN standard, only revert to ERROR_ACTIVE when the
error counters are less than 96.
Moreover, in certain Kvaser models, the BUS_ERROR flag is
always set along with undefined bits in the M16C status
register. Thus use bitwise operators instead of full equality
for checking that register against bus errors.
Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/leds')
0 files changed, 0 insertions, 0 deletions