On 10/11/19 3:38 PM, Timo Schlüßler wrote: > Always stop device when CAN_STATE_BUS_OFF is entered because the restart is > issued automatically through can.do_set_mode depending on restart-ms. Otherwise > the device re-enters CAN_STATE_ERROR_ACTIVE automatically after "128 occurences > of 11 consecutive recessive bits". Also fixes potential race condition by > resetting force_quit before enabling interrupts. I've moved the race condition fix into a separate patch, which was part of today's pull request. I'm not sure about the restart-ms, though. I think we discussed that quite some time ago. Back in the days we decided that if the controller does support automatic restart via the "128 occurrences of 11 consecutive recessive bits" and restart-ms is > 0, we'll let the controller do the restart. If restart-ms is 0, we'll shut down the controller and wait for a manual restart. However we can discuss if this is still the best solution. regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachment:
signature.asc
Description: OpenPGP digital signature