Commit fd99d6e
can: flexcan: only change CAN state when link up in system PM
After a suspend/resume cycle on a down interface, it will come up as
ERROR-ACTIVE.
$ ip -details -s -s a s dev flexcan0
3: flexcan0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN group default qlen 10
link/can promiscuity 0 allmulti 0 minmtu 0 maxmtu 0
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 1000
$ sudo systemctl suspend
$ ip -details -s -s a s dev flexcan0
3: flexcan0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN group default qlen 10
link/can promiscuity 0 allmulti 0 minmtu 0 maxmtu 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 1000
And only set CAN state to CAN_STATE_ERROR_ACTIVE when resume process
has no issue, otherwise keep in CAN_STATE_SLEEPING as suspend did.
Fixes: 4de349e ("can: flexcan: fix resume function")
Cc: [email protected]
Signed-off-by: Haibo Chen <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reported-by: Marc Kleine-Budde <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]
[mkl: add newlines]
Signed-off-by: Marc Kleine-Budde <[email protected]>1 parent d5cd454 commit fd99d6e
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2266 | 2266 | | |
2267 | 2267 | | |
2268 | 2268 | | |
| 2269 | + | |
| 2270 | + | |
2269 | 2271 | | |
2270 | | - | |
2271 | 2272 | | |
2272 | 2273 | | |
2273 | 2274 | | |
| |||
2278 | 2279 | | |
2279 | 2280 | | |
2280 | 2281 | | |
2281 | | - | |
2282 | 2282 | | |
2283 | 2283 | | |
2284 | 2284 | | |
| |||
2298 | 2298 | | |
2299 | 2299 | | |
2300 | 2300 | | |
| 2301 | + | |
| 2302 | + | |
2301 | 2303 | | |
2302 | 2304 | | |
2303 | 2305 | | |
| |||
0 commit comments