]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
can: dev: can_dev_dropped_skb: drop CC/FD frames in CANXL-only mode
authorOliver Hartkopp <socketcan@hartkopp.net>
Wed, 26 Nov 2025 10:16:08 +0000 (11:16 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 26 Nov 2025 10:20:43 +0000 (11:20 +0100)
commit6df01533e535d21cac779ff35cc25c43304035c3
treeea4c8abbafe9c498a804784f909bf006a09b0d8b
parent233134af208689c2d5d40896f5740473a74e3cb2
can: dev: can_dev_dropped_skb: drop CC/FD frames in CANXL-only mode

The error-signalling (ES) is a mandatory functionality for CAN CC and
CAN FD to report CAN frame format violations by sending an error-frame
signal on the bus.

A so-called 'mixed-mode' is intended to have (XL-tolerant) CAN FD nodes
and CAN XL nodes on one CAN segment, where the FD-controllers can talk
CC/FD and the XL-controllers can talk CC/FD/XL. This mixed-mode
utilizes the error-signalling for sending CC/FD/XL frames.

The CANXL-only mode disables the error-signalling in the CAN XL
controller. This mode does not allow CC/FD frames to be sent but
additionally offers a CAN XL transceiver mode switching (TMS).

Configured with CAN_CTRLMODE_FD and CAN_CTRLMODE_XL this leads to:

FD=0 XL=0 CC-only mode         (ES=1)
FD=1 XL=0 FD/CC mixed-mode     (ES=1)
FD=1 XL=1 XL/FD/CC mixed-mode  (ES=1)
FD=0 XL=1 XL-only mode         (ES=0, TMS optional)

The helper function can_dev_in_xl_only_mode() determines the required
value to disable error signalling in the CAN XL controller.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20251126-canxl-v8-7-e7e3eb74f889@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/linux/can/dev.h