[PATCH 0/8 v3] can: peak_usb: value net dev_port field from flash memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux