]> 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)
commit345eafbc7e354ffcd502b401ebd50e1f859c8cdf
tree35f84046bc5eca098f24234c5dd558418594f26b
parentba4ba0464a4937154cc2dcabcca381777b70c784
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