History

Merge tag 'linux-can-next-for-5.14-20210527' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says: ==================== can-next 2021-05-27 The first 2 patches are by Geert Uytterhoeven and convert the rcan_can and rcan_canfd device tree bindings to yaml. The next 2 patches are by Oliver Hartkopp and me and update the CAN uapi headers. zuoqilin's patch removes an unnecessary variable from the CAN proc code. Patrick Menschel contributes 3 patches for CAN ISOTP to enhance the error messages. Jiapeng Chong's patch removes two dead stores from the softing driver. The next 4 patches are by me and silence several warnings found by clang compiler. Jimmy Assarsson's patches for the kvaser_usb driver add support for the Kvaser hydra devices. Dario Binacchi provides 2 patches for the c_can driver, first removing an unused variable, then adding basic ethtool support to query driver and ring parameter info. The last 4 patches are by Torin Cooper-Bennun and clean up the m_can driver. * tag 'linux-can-next-for-5.14-20210527' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (21 commits) can: m_can: fix whitespace in a few comments can: m_can: make TXESC, RXESC config more explicit can: m_can: clean up CCCR reg defs, order by revs can: m_can: use bits.h macros for all regmasks can: c_can: add ethtool support can: c_can: remove unused variable struct c_can_priv::rxmasked can: kvaser_usb: Add new Kvaser hydra devices can: kvaser_usb: Rename define USB_HYBRID_{,PRO_}CANLIN_PRODUCT_ID can: at91_can: silence clang warning can: mcp251xfd: silence clang warning can: mcp251x: mcp251x_can_probe(): silence clang warning can: hi311x: hi3110_can_probe(): silence clang warning can: softing: Remove redundant variable ptr can: isotp: Add error message if txqueuelen is too small can: isotp: add symbolic error message to isotp_module_init() can: isotp: change error format from decimal to symbolic error names can: proc: remove unnecessary variables can: uapi: introduce CANFD_FDF flag for mixed content in struct canfd_frame can: uapi: update CAN-FD frame description dt-bindings: can: rcar_canfd: Convert to json-schema ... ====================

Jakub Kicinski committed 5 years ago

Commit b14b27f2 parents f285f37 50fe75419 files · +463 −347Browse files

Showing the changes to include/uapi (1 of 19 files). Show all

Unified · Split

include/uapi/linux/can.h+11−2
@@ -123,8 +123,8 @@ struct can_frame { · 122 unmodified lines
123123 /*
124124 * defined bits for canfd_frame.flags
125125 *
126− * The use of struct canfd_frame implies the Extended Data Length (EDL) bit to
127− * be set in the CAN frame bitstream on the wire. The EDL bit switch turns
126+ * The use of struct canfd_frame implies the FD Frame (FDF) bit to
127+ * be set in the CAN frame bitstream on the wire. The FDF bit switch turns
128128 * the CAN controllers bitstream processor into the CAN FD mode which creates
129129 * two new options within the CAN FD frame specification:
130130 *
@@ -135,9 +135,18 @@ struct can_frame { · 4 unmodified lines
135135 * controller only the CANFD_BRS bit is relevant for real CAN controllers when
136136 * building a CAN FD frame for transmission. Setting the CANFD_ESI bit can make
137137 * sense for virtual CAN interfaces to test applications with echoed frames.
138+ *
139+ * The struct can_frame and struct canfd_frame intentionally share the same
140+ * layout to be able to write CAN frame content into a CAN FD frame structure.
141+ * When this is done the former differentiation via CAN_MTU / CANFD_MTU gets
142+ * lost. CANFD_FDF allows programmers to mark CAN FD frames in the case of
143+ * using struct canfd_frame for mixed CAN / CAN FD content (dual use).
144+ * N.B. the Kernel APIs do NOT provide mixed CAN / CAN FD content inside of
145+ * struct canfd_frame therefore the CANFD_FDF flag is disregarded by Linux.
138146 */
139147 #define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */
140148 #define CANFD_ESI 0x02 /* error state indicator of the transmitting node */
149+#define CANFD_FDF 0x04 /* mark CAN FD for dual use of struct canfd_frame */
141150
142151 /**
143152 * struct canfd_frame - CAN flexible data rate frame structure