linux/drivers/net/can
Marc Kleine-Budde 9139c24acf can: m_can: fix CAN state in system PM
[ Upstream commit a9e30a22d6 ]

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: e0d1f4816f ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-23 16:24:28 +02:00
..
c_can can: c_can: Use syscon_regmap_lookup_by_phandle_args 2025-02-19 10:44:21 +01:00
cc770 can: {cc770,sja1000}_isa: allow building on x86_64 2024-11-04 17:46:06 +01:00
ctucanfd docs: Fix kernel-doc error in CAN driver 2025-07-25 13:09:07 +02:00
dev Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-24 11:10:46 -07:00
esd can: esd_402_pci: Add support for one-shot mode 2024-08-05 17:32:00 +02:00
flexcan can: dev: add struct data_bittiming_params to group FD parameters 2025-05-21 14:33:28 +02:00
ifi_canfd can: dev: add struct data_bittiming_params to group FD parameters 2025-05-21 14:33:28 +02:00
kvaser_pciefd can: kvaser_pciefd: Add devlink port support 2025-07-25 17:55:46 +02:00
m_can can: m_can: fix CAN state in system PM 2025-10-23 16:24:28 +02:00
mscan can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
peak_canfd can: dev: add struct data_bittiming_params to group FD parameters 2025-05-21 14:33:28 +02:00
rcar can: rcar_canfd: Fix controller mode setting 2025-09-19 18:59:15 +02:00
rockchip time/timecounter: Fix the lie that struct cyclecounter is const 2025-07-01 15:38:25 +02:00
sja1000 can: tscan1: CAN_TSCAN1 can depend on PC104 2025-07-25 13:08:52 +02:00
slcan can: slcan: allow reception of short error messages 2025-05-21 10:12:05 +02:00
softing can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
spi can: hi311x: populate ndo_change_mtu() to prevent buffer overflow 2025-09-19 19:03:01 +02:00
usb can: gs_usb: increase max interface to U8_MAX 2025-10-23 16:24:24 +02:00
at91_can.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
bxcan.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
can327.c tty: use u8 for flags 2023-08-11 21:12:45 +02:00
grcan.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
janz-ican3.c can: janz-ican3: use sysfs_emit() in fwinfo_show() 2025-07-15 11:41:41 +02:00
Kconfig can: kvaser_pciefd: Add devlink support 2025-07-25 17:55:46 +02:00
Makefile can: kvaser_pciefd: Split driver into C-file and header-file. 2025-07-25 17:53:50 +02:00
sun4i_can.c can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow 2025-09-19 19:03:01 +02:00
ti_hecc.c can: ti_hecc: fix -Woverflow compiler warning 2025-07-15 13:32:02 +02:00
vcan.c net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
vxcan.c net: Use link/peer netns in newlink() of rtnl_link_ops 2025-02-21 15:28:02 -08:00
xilinx_can.c can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB 2025-09-10 17:12:05 +02:00