linux_dsm_epyc7002/drivers/net/can
Frieder Schrempf eecb4df8ec can: mcp251x: fix resume from sleep before interface was brought up
[ Upstream commit 03c427147b2d3e503af258711af4fc792b89b0af ]

Since 8ce8c0abcb the driver queues work via priv->restart_work when
resuming after suspend, even when the interface was not previously
enabled. This causes a null dereference error as the workqueue is only
allocated and initialized in mcp251x_open().

To fix this we move the workqueue init to mcp251x_can_probe() as there
is no reason to do it later and repeat it whenever mcp251x_open() is
called.

Fixes: 8ce8c0abcb ("can: mcp251x: only reset hardware as required")
Link: https://lore.kernel.org/r/17d5d714-b468-482f-f37a-482e3d6df84e@kontron.de
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[mkl: fix error handling in mcp251x_stop()]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:13:08 +02:00
..
c_can can: c_can: move runtime PM enable/disable to c_can_platform 2021-03-30 14:32:00 +02:00
cc770 can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00
dev net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
ifi_canfd treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
m_can can: tcan4x5x: fix max register value 2021-04-07 15:00:07 +02:00
mscan can: mscan: simplify clock enable/disable 2020-09-21 10:13:19 +02:00
peak_canfd can: peak_canfd: pucan_handle_can_rx(): fix echo management when loopback is on 2020-11-03 22:30:32 +01:00
rcar treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
sja1000 can: sja1000: sja1000_err(): don't count arbitration lose as an error 2020-11-30 12:43:54 +01:00
softing can: softing: softing_netdev_open(): fix error handling 2020-12-05 13:08:11 -08:00
spi can: mcp251x: fix resume from sleep before interface was brought up 2021-05-19 10:13:08 +02:00
usb drivers: net: fix memory leak in peak_usb_create_dev 2021-04-14 08:42:13 +02:00
at91_can.c can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00
flexcan.c can: flexcan: flexcan_chip_freeze(): fix chip freeze for missing bitrate 2021-03-30 14:31:59 +02:00
grcan.c can: drivers: fix spelling mistakes 2020-09-21 10:13:16 +02:00
janz-ican3.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
Kconfig can: kvaser_pciefd: select CONFIG_CRC32 2021-01-17 14:17:00 +01:00
kvaser_pciefd.c can: kvaser_pciefd: Always disable bus load reporting 2021-03-30 14:31:59 +02:00
led.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile can: dev: move driver related infrastructure into separate subdir 2021-04-07 15:00:07 +02:00
pch_can.c can: pch_can: use generic power management 2020-09-21 10:13:18 +02:00
slcan.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
sun4i_can.c can: sun4i_can: sun4i_can_err(): don't count arbitration lose as an error 2020-11-30 12:43:54 +01:00
ti_hecc.c can: ti_hecc: Fix memleak in ti_hecc_probe 2020-11-15 18:24:35 +01:00
vcan.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
vxcan.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 15:00:07 +02:00
xilinx_can.c can: xilinx_can: handle failure cases of pm_runtime_get_sync 2020-11-03 22:30:32 +01:00