can: pcan_usb: add support of rxerr/txerr counters
authorStephane Grosjean <s.grosjean@peak-system.com>
Fri, 6 Dec 2019 15:38:03 +0000 (16:38 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 21 Sep 2020 08:13:18 +0000 (10:13 +0200)
commitea8b33bde76c8fcef347b9b9cf15649fe41a5a6e
tree0485fd99172c4f2e0f71cbaea9f96fa18b8ca6b0
parenta8bb19dfab5a6420b07de7720545ac2277febe07
can: pcan_usb: add support of rxerr/txerr counters

This patch adds the support of the rx/tx errors CAN counters to the
driver of the PCAN-USB PC-CAN interface from PEAK-System GmbH.

The PCAN-USB is capable of giving back the values of the rx/tx errors
counters, to provide more details and statistics to the linux-can layer.
Getting these values allows the driver to better tune CAN_ERR_CRTL_TX_xxx
and CAN_ERR_CRTL_RX_xxx bits in case of the interface enters any
CAN_STATE_ERROR_xxx state.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Link: https://lore.kernel.org/r/20191206153803.17725-3-s.grosjean@peak-system.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb.c