Re: [PATCH v2] can: gs_usb: gs_can_open(): always configure bitrates before starting device

From: Marc Kleine-Budde

Date: Mon Mar 02 2026 - 05:15:49 EST


On 19.02.2026 13:57:34, Marc Kleine-Budde wrote:
> 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@xxxxxxxxxxxxxxx
> Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>

Applied to linux-can.

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |

Attachment: signature.asc
Description: PGP signature