linux/drivers/net/can/usb
Marc Kleine-Budde 2df6162785 can: gs_usb: gs_can_open(): always configure bitrates before starting device
So far the driver populated the struct can_priv::do_set_bittiming() and
struct can_priv::fd::do_set_data_bittiming() callbacks.

Before bringing up the interface, user space has to configure the bitrates.
With these callbacks the configuration is directly forwarded into the CAN
hardware. Then the interface can be brought up.

An ifdown-ifup cycle (without changing the bit rates) doesn't re-configure
the bitrates in the CAN hardware. This leads to a problem with the
CANable-2.5 [1] firmware, which resets the configured bit rates during
ifdown.

To fix the problem remove both bit timing callbacks and always configure
the bitrates in the struct net_device_ops::ndo_open() callback.

[1] https://github.com/Elmue/CANable-2.5-firmware-Slcan-and-Candlelight

Cc: stable@vger.kernel.org
Fixes: d08e973a77 ("can: gs_usb: Added support for the GS_USB CAN devices")
Link: https://patch.msgid.link/20260219-gs_usb-always-configure-bitrates-v2-1-671f8ba5b0a5@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2026-03-02 11:09:36 +01:00
..
etas_es58x can: usb: etas_es58x: correctly anchor the urb in the read bulk callback 2026-03-02 11:03:42 +01:00
kvaser_usb Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
peak_usb Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig can: Add Nuvoton NCT6694 CANFD support 2025-09-16 14:41:57 +01:00
Makefile can: Add Nuvoton NCT6694 CANFD support 2025-09-16 14:41:57 +01:00
ems_usb.c can: ems_usb: ems_usb_read_bulk_callback(): check the proper length of a message 2026-03-02 11:03:42 +01:00
esd_usb.c can: esd_usb: add endpoint type validation 2026-03-02 11:03:32 +01:00
f81604.c can: usb: f81604: correctly anchor the urb in the read bulk callback 2026-03-02 11:04:15 +01:00
gs_usb.c can: gs_usb: gs_can_open(): always configure bitrates before starting device 2026-03-02 11:09:36 +01:00
mcba_usb.c can: mcba_usb: mcba_usb_read_bulk_callback(): fix URB memory leak 2026-01-16 20:40:46 +01:00
nct6694_canfd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ucan.c can: ucan: Fix infinite loop from zero-length messages 2026-03-02 11:03:42 +01:00
usb_8dev.c can: usb_8dev: usb_8dev_read_bulk_callback(): fix URB memory leak 2026-01-16 20:40:52 +01:00