linux/drivers/net/can
Marc Kleine-Budde 00293f3627 can: gs_usb: gs_can_open(): always configure bitrates before starting device
commit 2df6162785 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:23 +01: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: fix SSP_SRC in cases when bit-rate is higher than 1 MBit. 2026-01-23 11:21:24 +01:00
dev can: netlink: can_changelink(): allow disabling of automatic restart 2025-10-20 17:20:12 +02:00
esd can: esd: acc_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() 2025-10-20 17:17:59 +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: replace Dong Aisheng's old email address 2025-10-09 10:25:53 +02:00
mscan can: Switch back to struct platform_driver::remove() 2024-09-11 09:37:16 +02:00
peak_canfd can: peak: Modification of references to email accounts being deleted 2025-09-13 19:04:57 +02:00
rcar can: rcar_canfd: Fix CAN-FD mode as default 2025-11-26 16:26:41 +01:00
rockchip can: rockchip-canfd: rkcanfd_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() 2025-10-20 17:18:04 +02:00
sja1000 can: sja1000: fix max irq loop handling 2025-11-16 16:34:41 +01: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: hi3110_open(): add check for hi3110_power_enable() return value 2026-03-19 16:08:16 +01:00
usb can: gs_usb: gs_can_open(): always configure bitrates before starting device 2026-03-19 16:08:23 +01:00
at91_can.c can: at91_can: Fix memory leak in at91_can_probe() 2026-02-06 16:57:29 +01:00
bxcan.c can: bxcan: bxcan_start_xmit(): use can_dev_dropped_skb() instead of can_dropped_invalid_skb() 2025-10-20 17:17:55 +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: sun4i_can_interrupt(): fix max irq loop handling 2025-11-17 17:23:37 +01:00
ti_hecc.c can: ti_hecc: fix -Woverflow compiler warning 2025-07-15 13:32:02 +02:00
vcan.c can: enable CAN XL for virtual CAN devices by default 2025-09-24 17:05:34 +02:00
vxcan.c can: enable CAN XL for virtual CAN devices by default 2025-09-24 17:05:34 +02: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