diff options
author | Ahmed S. Darwish <ahmed.darwish@valeo.com> | 2015-01-26 08:25:43 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-01-27 10:55:09 +0300 |
commit | e638642b08c170d2021b706f0b1c4f4ae93d8cbd (patch) | |
tree | 06fc61fd8ee8e6c320606f545bbc1eba8f7078ab /mm/hugetlb.c | |
parent | 14c10c2a1dd8eb8e00b750b521753260befa2789 (diff) | |
download | linux-e638642b08c170d2021b706f0b1c4f4ae93d8cbd.tar.xz |
can: kvaser_usb: Fix state handling upon BUS_ERROR events
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>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'mm/hugetlb.c')
0 files changed, 0 insertions, 0 deletions