[PATCH can-next 03/13] can: gs_usb: update USB protocol definitions contributed by Elmue firmware
Marc Kleine-Budde <[email protected]> Mon, 20 Jul 2026 15:48:04 +0200
| Newsgroups | org.kernel.vger.linux-can,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The gs_usb compatible firmware by Elmue extended the USB protocol. Document the newly added GS_CAN_FEATURE_ELM_* bits and the new GS_USB_BREQ_ELM_GET_* USB requests along with some placeholders for future extensions. Link: https://github.com/Elmue/CANable-2.5-firmware-Slcan-and-Candlelight Signed-off-by: Marc Kleine-Budde <[email protected]> --- drivers/net/can/usb/gs_usb.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c index 2f55030a21a5..57062983b148 100644 --- a/drivers/net/can/usb/gs_usb.c +++ b/drivers/net/can/usb/gs_usb.c @@ -72,6 +72,23 @@ enum gs_usb_breq { GS_USB_BREQ_SET_TERMINATION, GS_USB_BREQ_GET_TERMINATION, GS_USB_BREQ_GET_STATE, + __GS_USB_BREQ_PLACEHOLDER_15, + __GS_USB_BREQ_PLACEHOLDER_16, + __GS_USB_BREQ_PLACEHOLDER_17, + __GS_USB_BREQ_PLACEHOLDER_18, + __GS_USB_BREQ_PLACEHOLDER_19, + GS_USB_BREQ_ELM_GET_BOARDINFO = 20, + GS_USB_BREQ_ELM_SET_FILTER, + GS_USB_BREQ_ELM_GET_LASTERROR, + GS_USB_BREQ_ELM_SET_BUSLOADREPORT, + GS_USB_BREQ_ELM_SET_PINSTATUS, + GS_USB_BREQ_ELM_GET_PINSTATUS, + GS_USB_BREQ_ELM_READ_FLASH, + GS_USB_BREQ_ELM_WRITE_FLASH, + __GS_USB_BREQ_ELM_PLACEHOLDER_28, + __GS_USB_BREQ_ELM_PLACEHOLDER_29, + __GS_USB_BREQ_ELM_PLACEHOLDER_30, + __GS_USB_BREQ_ELM_PLACEHOLDER_31, }; enum gs_can_mode { @@ -168,7 +185,14 @@ struct gs_device_termination_state { #define GS_CAN_FEATURE_TERMINATION BIT(11) #define GS_CAN_FEATURE_BERR_REPORTING BIT(12) #define GS_CAN_FEATURE_GET_STATE BIT(13) -#define GS_CAN_FEATURE_MASK GENMASK(13, 0) +#define GS_CAN_FEATURE_ELM_PROTOCOL BIT(14) +/* supported by Elmue firmware until 0x260528 (including) */ +#define GS_CAN_FEATURE_ELM_DISABLE_TX_ECHO BIT(15) +/* supported by Elmue firmware since 0x260529 (including) */ +#define GS_CAN_FEATURE_ELM_DEV_FLAG_SEND_USB_BLOBS BIT(15) +/* supported by Elmue firmware 0x260528 only */ +#define GS_CAN_FEATURE_ELM_DEV_FLAG_SEND_USB_BLOBS_260528 BIT(16) +#define GS_CAN_FEATURE_MASK GENMASK(16, 0) /* internal quirks - keep in GS_CAN_FEATURE space for now */ -- 2.53.0