The field "struct net_device::dev_port" (exported under sysfs) is used to differentiate between the interfaces of a device. This series of patches allows the user to value this field from a value read from the flash memory of the CAN-USB interfaces of PEAK-System GmbH by implementing the ethtool interface which offers read/write access to the eeprom of the device: $ ethtool -E can0 value 3 $ ethtool -e can0 Offset Values ------ ------ 0x0000: 03 00 00 00 $ cat /sys/class/net/can0/dev_port 3 Uniquely identifying the CAN interface of a USB device allows it to be connected to any USB port on the host machine, in any order. Signed-off-by: Stephane Grosjean <s.grosjean@xxxxxxxxxxxxxxx> Stephane Grosjean (8): can: peak_usb: rename a callback to a more explicit name can: peak_usb: add callback to read user value of CANFD devices can: peak_usb: correction of a wrong field name can: peak_usb: switch function parameter to native format can: peak_usb: allow flashing of user defined value can: peak_usb: add ethtool interface to user defined flashed device number can: peak_usb: replace device_number priv field with netdev dev_port field can: peak_usb: replace unregister_netdev() with unregister_candev() drivers/net/can/usb/peak_usb/pcan_usb.c | 39 +++++++++-- drivers/net/can/usb/peak_usb/pcan_usb_core.c | 74 ++++++++++++++++++-- drivers/net/can/usb/peak_usb/pcan_usb_core.h | 10 ++- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 56 ++++++++++++++- drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 27 +++++-- drivers/net/can/usb/peak_usb/pcan_usb_pro.h | 3 +- 6 files changed, 192 insertions(+), 17 deletions(-) -- 2.25.1