Re: [PATCH 0/3] Add support for Renesas CAN-FD Bus-Off recovery mode selection
From: Marc Kleine-Budde
Date: Fri Apr 03 2026 - 17:45:19 EST
On 03.04.2026 10:49:57, Biju wrote:
> From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
>
> The CAN-FD IP supports the below Bus-Off recovery modes:
> 1) ISO11898-1 compliant
> 2) Entry to Channel Halt mode automatically at bus-off entry
> 3) Entry to Channel Halt mode automatically at bus-off end
> 4) Entry to Channel Halt mode (in bus-off state) by program request
>
> Add support for Bus-Off recovery mode selection via the
> renesas,bus-off-recovery-mode device tree property. If the property is
> absent, it defaults to RCANFD_CCTR_BOM_BENTRY (entry to Channel Halt mode
> automatically at bus-off entry) for backward compatibility.
Using DT properties for configuration is not the best way to go. I think
we first have to get the CAN error state handling fixed, before you add
new features.
Can you explain a bit more what the controller does in the different
modes?
In the current driver when the bus off IRQ (RCANFD_CERFL_BOEF) fires,
the driver calls can_bus_off(), which triggers the configured bus off
handling.
What the Linux driver should do is once the HW is in bus off mode,
switch off the HW and let the .do_set_mode(CAN_MODE_START) callback
restart the hardware.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature