diff options
author | Haibo Chen <haibo.chen@nxp.com> | 2025-03-14 14:01:44 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2025-03-14 15:25:12 +0300 |
commit | fd99d6ed20234b83d65b9c5417794343577cf3e5 (patch) | |
tree | 758fc4337cace3a0ecb3bbbda69d94d22bafefaa /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | d5cd454825566989f97e0748e1047b9532338b99 (diff) | |
download | linux-fd99d6ed20234b83d65b9c5417794343577cf3e5.tar.xz |
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: 4de349e786a3 ("can: flexcan: fix resume function")
Cc: stable@vger.kernel.org
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://patch.msgid.link/20250314110145.899179-1-haibo.chen@nxp.com
Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
Closes: https://lore.kernel.org/all/20250314-married-polar-elephant-b15594-mkl@pengutronix.de
[mkl: add newlines]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions