[PATCH 0/7] can: m_can: fix pm_runtime and CAN state handling
From: Marc Kleine-Budde
Date: Tue Aug 12 2025 - 13:38:58 EST
The first patch fixes a pm_runtime imbalance in the m_can_platform
driver.
The rest of this series fixes the CAN state handling in the m_can
driver:
- add the missing state transition from from Error Warning back to
Error Active (Patches 2+3)
- address the fact that in some SoCs (observed on the STM32MP15) the
M_CAN IP core keeps the CAN state and CAN error counters over an
internal reset cycle. Set the correct CAN state during ifup and
system resume (Patches 4+5)
- add support for optional shared external reset, to properly reset
the IP core (Patches 6+7)
Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
---
Marc Kleine-Budde (7):
can: m_can: m_can_plat_remove(): add missing pm_runtime_disable()
can: m_can: m_can_rx_handler(): only handle active interrupts
can: m_can: m_can_handle_state_errors(): fix CAN state transition to Error Active
can: m_can: m_can_chip_config(): bring up interface in correct state
can: m_can: fix CAN state in system PM
can: m_can: m_can_get_berr_counter(): don't wake up controller if interface is down
can: m_can: add optional support for reset
drivers/net/can/m_can/m_can.c | 93 ++++++++++++++++++++++++----------
drivers/net/can/m_can/m_can.h | 1 +
drivers/net/can/m_can/m_can_platform.c | 2 +-
3 files changed, 68 insertions(+), 28 deletions(-)
---
base-commit: 89886abd073489e26614e4d80fb8eb70d3938a0b
change-id: 20250811-m_can-fix-state-handling-0ba4bda6cb8e
Best regards,
--
Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>