Skip to content

Introduce optional DLC element for Classic CAN

Oliver Hartkopp linux-can netdev 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest8 patches 3 repliesIn review
  2. v58 patches 4 repliesSuperseded
  3. v47 patches 5 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches8 repliesSuperseded
v24 patches4 repliesSuperseded
v1 RFC1 patch16 repliesSuperseded

Changes in v2 from the cover letter

- rephrase commit message of patch 4 about can_dlc replacement

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8can: add optional DLC element to Classical CAN frame structureinclude/uapi/linux/can.h include/uapi/linux/can/netlink.h+25 -140 replies
2/8can: rename get_can_dlc() macro with can_cc_dlc2len()drivers/net/can/at91_can.c drivers/net/can/c_can/c_can.c drivers/net/can/cc770/cc770.c +29 more+45 -450 replies
3/8can: remove obsolete get_canfd_dlc() macrodrivers/net/can/flexcan.c drivers/net/can/peak_canfd/peak_canfd.c drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c +4 more+6 -70 replies
4/8can: replace can_dlc as variable/element for payload lengthdrivers/net/can/at91_can.c drivers/net/can/c_can/c_can.c drivers/net/can/cc770/cc770.c +37 more+231 -2311 reply
5/8can: rename CAN FD related can_len2dlc and can_dlc2len helpersDocumentation/networking/can.rst drivers/net/can/dev.c drivers/net/can/flexcan.c +10 more+32 -320 replies
6/8can: update documentation for DLC usage in Classical CANDocumentation/networking/can.rst+52 -160 replies
7/8can-dev: introduce helpers to access Classical CAN DLC valuesinclude/linux/can/dev.h+28 -02 replies
8/8can-dev: add len8_dlc support for various CAN USB adaptersdrivers/net/can/usb/gs_usb.c drivers/net/can/usb/peak_usb/pcan_usb.c drivers/net/can/usb/peak_usb/pcan_usb_fd.c +1 more+28 -160 replies

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by.

PatchOliver Hartkopp
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/8] Introduce optional DLC element for Classic CAN

Introduce improved DLC handling for Classic CAN with introduces a new element 'len8_dlc' to the struct can_frame and additionally rename the 'can_dlc' element to 'len' as it represents a plain payload length.

Before implementing the CAN_CTRLMODE_CC_LEN8_DLC handling on driver level this patch set cleans up and renames the relevant code.

No functional changes.

This patch set is based on kernel/git/netdev/net-next.git

Changes in v2:
- rephrase commit message of patch 4 about can_dlc replacement

Changes in v3:
- remove unnecessarily introduced u8 cast in flexcan.c

Changes in v4:
- adopt phrasing suggestions from Vincent Mailhol
- separate and extend CAN documentation (Documentation/networking/can.rst)
- add new patches for len8_dlc handling for CAN drivers
- add new helpers in include/linux/can/dev.h
- add len8_dlc support for various CAN USB adapters as reference

Changes in v5:
- rename CAN FD related can_len2dlc and can_dlc2len helpers so that they fit to the renamed can_cc_dlc2len helper for Classical CAN (suggested by Vincent Mailhol)

Changes in v6: (only patch 7 & 8)
- rework helpers to access Classical CAN DLC values
- move CAN_CTRLMODE_CC_LEN8_DLC at the end of ctrlmode_supported defs

Oliver Hartkopp (8):
can: add optional DLC element to Classical CAN frame structure
can: rename get_can_dlc() macro with can_cc_dlc2len()
can: remove obsolete get_canfd_dlc() macro
can: replace can_dlc as variable/element for payload length
can: rename CAN FD related can_len2dlc and can_dlc2len helpers
can: update documentation for DLC usage in Classical CAN
can-dev: introduce helpers to access Classical CAN DLC values
can-dev: add len8_dlc support for various CAN USB adapters

 Documentation/networking/can.rst              | 70 ++++++++++++++-----
 drivers/net/can/at91_can.c                    | 14 ++--
 drivers/net/can/c_can/c_can.c                 | 20 +++---
 drivers/net/can/cc770/cc770.c                 | 14 ++--
 drivers/net/can/dev.c                         | 16 ++---
 drivers/net/can/flexcan.c                     |  6 +-
 drivers/net/can/grcan.c                       | 10 +--
 drivers/net/can/ifi_canfd/ifi_canfd.c         | 10 +--
 drivers/net/can/janz-ican3.c                  | 20 +++---
 drivers/net/can/kvaser_pciefd.c               | 10 +--
 drivers/net/can/m_can/m_can.c                 | 12 ++--
 drivers/net/can/mscan/mscan.c                 | 20 +++---
 drivers/net/can/pch_can.c                     | 14 ++--
 drivers/net/can/peak_canfd/peak_canfd.c       | 16 ++---
 drivers/net/can/rcar/rcar_can.c               | 14 ++--
 drivers/net/can/rcar/rcar_canfd.c             | 12 ++--
 drivers/net/can/rx-offload.c                  |  2 +-
 drivers/net/can/sja1000/sja1000.c             | 10 +--
 drivers/net/can/slcan.c                       | 32 ++++-----
 drivers/net/can/softing/softing_fw.c          |  2 +-
 drivers/net/can/softing/softing_main.c        | 14 ++--
 drivers/net/can/spi/hi311x.c                  | 20 +++---
 drivers/net/can/spi/mcp251x.c                 | 20 +++---
 .../net/can/spi/mcp251xfd/mcp251xfd-core.c    | 10 +--
 drivers/net/can/sun4i_can.c                   | 10 +--
 drivers/net/can/ti_hecc.c                     |  8 +--
 drivers/net/can/usb/ems_usb.c                 | 16 ++---
 drivers/net/can/usb/esd_usb2.c                | 16 ++---
 drivers/net/can/usb/gs_usb.c                  | 17 ++---
 .../net/can/usb/kvaser_usb/kvaser_usb_core.c  |  2 +-
 .../net/can/usb/kvaser_usb/kvaser_usb_hydra.c | 24 +++----
 .../net/can/usb/kvaser_usb/kvaser_usb_leaf.c  | 22 +++---
 drivers/net/can/usb/mcba_usb.c                | 10 +--
 drivers/net/can/usb/peak_usb/pcan_usb.c       | 18 ++---
 drivers/net/can/usb/peak_usb/pcan_usb_fd.c    | 29 +++++---
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c   | 14 ++--
 drivers/net/can/usb/ucan.c                    | 20 +++---
 drivers/net/can/usb/usb_8dev.c                | 20 +++---
 drivers/net/can/xilinx_can.c                  | 16 ++---
 include/linux/can/dev.h                       | 41 +++++++++--
 include/linux/can/dev/peak_canfd.h            |  2 +-
 include/uapi/linux/can.h                      | 38 ++++++----
 include/uapi/linux/can/netlink.h              |  1 +
 net/can/af_can.c                              |  2 +-
 net/can/gw.c                                  |  2 +-
 net/can/j1939/main.c                          |  4 +-
 46 files changed, 403 insertions(+), 317 deletions(-)
Signature · 1 line
2.28.0