MCP2517FD Bus-Off recovery
From: <hidden>
Date: 2017-10-04 16:32:06
Hi all, I'm working on a driver for the new MCP2517FD CAN controller (http://www.microchip.com/wwwproducts/en/MCP2517FD). This is a substantially different device from the MCP2515 so it's a separate driver. My question pertains to error recovery. This device automatically recovers from Bus-Off to Error-Active after some internal delay (see fig.11-1 of the Family Reference Manual). The ISR detects this state change, but I'm not sure how to handle it in regards to can_restart. Should I just update call netif_carrier_on and netif_wake_queue from the ISR to put the device back into normal mode? Also, should the CAN state really be set to CAN_STATE_BUS_OFF while the device is in bus-off mode, since it will recover automatically and there's no explicit "restart" action? Thanks, - Marcel