linux/drivers/net/can/usb/kvaser_usb
Jimmy Assarsson aa6a5c995e can: kvaser_usb: Add devlink port support
Register each CAN channel of the device as an devlink physical port.
This makes it easier to get device information for a given network
interface (i.e. can2).

Example output:
  $ devlink dev
  usb/1-1.3:1.0

  $ devlink port
  usb/1-1.3:1.0/0: type eth netdev can0 flavour physical port 0 splittable false
  usb/1-1.3:1.0/1: type eth netdev can1 flavour physical port 1 splittable false

  $ devlink port show can1
  usb/1-1.3:1.0/1: type eth netdev can1 flavour physical port 0 splittable false

  $ devlink dev info
  usb/1-1.3:1.0:
    driver kvaser_usb
    serial_number 1020
    versions:
        fixed:
          board.rev 1
          board.id 7330130009653
        running:
          fw 3.22.527

  $ ethtool -i can1
  driver: kvaser_usb
  version: 6.12.10-arch1-1
  firmware-version: 3.22.527
  expansion-rom-version:
  bus-info: 1-1.3:1.0
  supports-statistics: no
  supports-test: no
  supports-eeprom-access: no
  supports-register-dump: no
  supports-priv-flags: no

Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://patch.msgid.link/20250725123452.41-11-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-07-25 18:01:22 +02:00
..
kvaser_usb.h can: kvaser_usb: Add devlink port support 2025-07-25 18:01:22 +02:00
kvaser_usb_core.c can: kvaser_usb: Add devlink port support 2025-07-25 18:01:22 +02:00
kvaser_usb_devlink.c can: kvaser_usb: Add devlink port support 2025-07-25 18:01:22 +02:00
kvaser_usb_hydra.c can: kvaser_usb: Store additional device information 2025-07-25 18:01:20 +02:00
kvaser_usb_leaf.c can: kvaser_usb: Store additional device information 2025-07-25 18:01:20 +02:00
Makefile can: kvaser_usb: Add devlink support 2025-07-25 18:01:21 +02:00