3
0
Fork 0
forked from mirrors/linux
kernel/drivers/net/can
Marc Kleine-Budde 0713a1b327 can: mcan: m_can_class_unregister(): fix order of unregistration calls
If a driver is removed, the driver framework invokes the driver's
remove callback. A CAN driver's remove function calls
unregister_candev(), which calls net_device_ops::ndo_stop further down
in the call stack for interfaces which are in the "up" state.

The removal of the module causes a warning, as can_rx_offload_del()
deletes the NAPI, while it is still active, because the interface is
still up.

To fix the warning, first unregister the network interface, which
calls net_device_ops::ndo_stop, which disables the NAPI, and then call
can_rx_offload_del().

Fixes: 1be37d3b04 ("can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250502-can-rx-offload-del-v1-3-59a9b131589d@pengutronix.de
Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-05-06 15:54:36 +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 can: ctucanfd: handle skb allocation failure 2025-02-08 11:28:57 +01:00
dev rtnetlink: Pack newlink() params into struct 2025-02-21 15:28:02 -08:00
esd can: esd_402_pci: Add support for one-shot mode 2024-08-05 17:32:00 +02:00
flexcan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-20 21:38:01 +01:00
ifi_canfd can: ifi_canfd: ifi_canfd_handle_lec_err(): fix {rx,tx}_errors statistics 2024-11-26 10:50:40 +01:00
m_can can: mcan: m_can_class_unregister(): fix order of unregistration calls 2025-05-06 15:54:36 +02:00
mscan can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
peak_canfd can: peak_canfd: Remove setting of RX software timestamp 2024-09-03 15:17:47 -07:00
rcar can: rcar_canfd: Fix page entries in the AFL list 2025-03-14 09:50:36 +01:00
rockchip can: rockchip_canfd: rkcanfd_remove(): fix order of unregistration calls 2025-05-06 15:54:04 +02:00
sja1000 treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
slcan
softing can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
spi can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls 2025-05-06 15:45:46 +02:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-20 21:38:01 +01: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
grcan.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
janz-ican3.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
Kconfig can: rockchip_canfd: add driver for Rockchip CAN-FD controller 2024-09-04 14:41:51 +02:00
kvaser_pciefd.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
Makefile can: rockchip_canfd: add driver for Rockchip CAN-FD controller 2024-09-04 14:41:51 +02:00
sun4i_can.c linux-can-next-for-6.14-20250110 2025-01-10 22:46:08 -08:00
ti_hecc.c can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +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: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00