Commit a9e30a2
committed
can: m_can: fix CAN state in system PM
A suspend/resume cycle on a down interface results in the interface
coming up in Error Active state. A suspend/resume cycle on an Up
interface will always result in Error Active state, regardless of the
actual CAN state.
During suspend, only set running interfaces to CAN_STATE_SLEEPING.
During resume only touch the CAN state of running interfaces. For
wakeup sources, set the CAN state depending on the Protocol Status
Regitser (PSR), for non wakeup source interfaces m_can_start() will do
the same.
Fixes: e0d1f48 ("can: m_can: add Bosch M_CAN controller support")
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://patch.msgid.link/20250929-m_can-fix-state-handling-v4-4-682b49b49d9a@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>1 parent 4942c42 commit a9e30a2
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2503 | 2503 | | |
2504 | 2504 | | |
2505 | 2505 | | |
| 2506 | + | |
2506 | 2507 | | |
2507 | 2508 | | |
2508 | 2509 | | |
2509 | 2510 | | |
2510 | | - | |
2511 | | - | |
2512 | 2511 | | |
2513 | 2512 | | |
2514 | 2513 | | |
| |||
2521 | 2520 | | |
2522 | 2521 | | |
2523 | 2522 | | |
2524 | | - | |
2525 | | - | |
2526 | 2523 | | |
2527 | 2524 | | |
2528 | 2525 | | |
| |||
2540 | 2537 | | |
2541 | 2538 | | |
2542 | 2539 | | |
| 2540 | + | |
| 2541 | + | |
2543 | 2542 | | |
2544 | 2543 | | |
2545 | 2544 | | |
| |||
0 commit comments