]> git.baikalelectronics.ru Git - kernel.git/commit
can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 25 Jun 2021 13:09:29 +0000 (15:09 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sat, 24 Jul 2021 17:02:32 +0000 (19:02 +0200)
commit99439fbaa81ecaee2d4ad79cd052e6d1b32f288f
tree902258d0b616e5a4340a2b48290c1ecf044490a7
parentbb97181e4843e2085182356ecbd7bd3021d86d5e
can: peak_usb: pcan_usb_handle_bus_evt(): fix reading rxerr/txerr values

This patch fixes an incorrect way of reading error counters in messages
received for this purpose from the PCAN-USB interface. These messages
inform about the increase or decrease of the error counters, whose values
are placed in bytes 1 and 2 of the message data (not 0 and 1).

Fixes: 426cf75a3f95 ("can: pcan_usb: add support of rxerr/txerr counters")
Link: https://lore.kernel.org/r/20210625130931.27438-4-s.grosjean@peak-system.com
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb.c