]> git.baikalelectronics.ru Git - kernel.git/commit
can: m_can: add support for handling arbitration error
authorPankaj Sharma <pankj.sharma@samsung.com>
Wed, 30 Oct 2019 11:38:59 +0000 (17:08 +0530)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 11 Nov 2019 20:58:09 +0000 (21:58 +0100)
commit0c3d67f2314601c9d377c3b103bdeb290c02bb94
tree35f84046bc5eca098f24234c5dd558418594f26b
parentc9d17081983f1dd18c07eda586bdd49ab7fb3cc2
can: m_can: add support for handling arbitration error

The Bosch MCAN hardware (3.1.0 and above) supports interrupt flag to
detect Protocol error in arbitration phase.

Transmit error statistics is currently not updated from the MCAN driver.
Protocol error in arbitration phase is a TX error and the network
statistics should be updated accordingly.

The member "tx_error" of "struct net_device_stats" should be incremented
as arbitration is a transmit protocol error. Also "arbitration_lost" of
"struct can_device_stats" should be incremented to report arbitration
lost.

Signed-off-by: Pankaj Sharma <pankj.sharma@samsung.com>
Signed-off-by: Sriram Dash <sriram.dash@samsung.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c