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)
commit23c5a9488f076bab336177cd1d1a366bd8ddf087
tree3564b2b04c72194c2621f24cc050eda9783ab309
parent3cb3eaac52c0f145d895f4b6c22834d5f02b8569
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