aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>2021-10-27 03:05:53 +0900
committerMarc Kleine-Budde <mkl@pengutronix.de>2022-01-05 12:09:00 +0100
commite233640cd3034ae65924316a0d95ccacb86ae4bd (patch)
treebd38386428dc522faf05f6bedc552fc36ee8737c /drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c
parentcan: sja1000: sp_probe(): use platform_get_irq() to get the interrupt (diff)
downloadlinux-dev-e233640cd3034ae65924316a0d95ccacb86ae4bd.tar.xz
linux-dev-e233640cd3034ae65924316a0d95ccacb86ae4bd.zip
can: etas_es58x: es58x_init_netdev: populate net_device::dev_port
The field dev_port of struct net_device indicates the port number of a network device [1]. This patch populates this field. This field can be helpful to distinguish between the two network interfaces of a dual channel device (i.e. ES581.4 or ES582.1). Indeed, at the moment, all the network interfaces of a same device share the same static udev attributes c.f. output of: | udevadm info --attribute-walk /sys/class/net/canX The dev_port attribute can then be used to write some udev rules to, for example, assign a permanent name to each network interface based on the serial/dev_port pair (which is convenient when you have a test bench with several CAN devices connected simultaneously and wish to keep consistent interface names upon reboot). [1] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net Link: https://lore.kernel.org/all/20211026180553.1953189-1-mailhol.vincent@wanadoo.fr Suggested-by: Lukas Magel <lukas.magel@escrypt.com> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb/kvaser_usb/kvaser_usb_hydra.c')
0 files changed, 0 insertions, 0 deletions