]> git.baikalelectronics.ru Git - kernel.git/commit
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open
authorJeroen Hofstee <jhofstee@victronenergy.com>
Tue, 1 Oct 2019 21:01:20 +0000 (21:01 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 4 Nov 2019 20:47:21 +0000 (21:47 +0100)
commit620178ddfa513346939097fe0635b6ced0aa447b
tree3564b2b04c72194c2621f24cc050eda9783ab309
parentca438566c43dfe38f8e11ba3cf38c92b3ff58e17
can: c_can: D_CAN: c_can_chip_config(): perform a sofware reset on open

When the CAN interface is closed it the hardwre is put in power down
mode, but does not reset the error counters / state. Reset the D_CAN on
open, so the reported state and the actual state match.

According to [1], the C_CAN module doesn't have the software reset.

[1] http://www.bosch-semiconductors.com/media/ip_modules/pdf_2/c_can_fd8/users_manual_c_can_fd8_r210_1.pdf

Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c