diff options
| author | Ahmed S. Darwish <ahmed.darwish@valeo.com> | 2015-01-26 07:25:43 +0200 |
|---|---|---|
| committer | Luis Henriques <luis.henriques@canonical.com> | 2015-02-04 10:58:22 +0000 |
| commit | c42be90e5004139eaea6c0a9ad49f5300eb2eddc (patch) | |
| tree | ee417d8c4f70fe0997179f89cd16d5d301fe5ea8 /include | |
| parent | 8944fd3f6f32286833402b7c6985a49940c812cf (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: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
