-
- Downloads
can: populate netdev::dev_id for udev discrimination
My objective is to be able to totally discriminate CAN ports on multi-port cards via udev so as to rename them to semantically interesting/unique names for my system (e.g., "ecuCAN" and "auxCAN" instead of "can0" and "can1"). The following patch assigns the dev_id field to match the channel number on all multi-channel devices. I can only test my two-port Peak PCI card, but it works as expected: ATTRS{dev_id} now expresses the port number and my udev rules now unambiguously pick out and rename my individual CAN ports. Signed-off-by:Christopher R. Baker <cbaker@rec.ri.cmu.edu> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> [PEAK PCAN-USB pro and EMS PCMCIA] Signed-off-by:
Marc Kleine-Budde <mkl@pengutronix.de>
Showing
- drivers/net/can/sja1000/ems_pci.c 1 addition, 0 deletionsdrivers/net/can/sja1000/ems_pci.c
- drivers/net/can/sja1000/ems_pcmcia.c 1 addition, 0 deletionsdrivers/net/can/sja1000/ems_pcmcia.c
- drivers/net/can/sja1000/kvaser_pci.c 1 addition, 0 deletionsdrivers/net/can/sja1000/kvaser_pci.c
- drivers/net/can/sja1000/peak_pci.c 1 addition, 0 deletionsdrivers/net/can/sja1000/peak_pci.c
- drivers/net/can/sja1000/peak_pcmcia.c 1 addition, 0 deletionsdrivers/net/can/sja1000/peak_pcmcia.c
- drivers/net/can/sja1000/plx_pci.c 1 addition, 0 deletionsdrivers/net/can/sja1000/plx_pci.c
- drivers/net/can/softing/softing_main.c 1 addition, 0 deletionsdrivers/net/can/softing/softing_main.c
- drivers/net/can/usb/esd_usb2.c 1 addition, 0 deletionsdrivers/net/can/usb/esd_usb2.c
- drivers/net/can/usb/kvaser_usb.c 1 addition, 0 deletionsdrivers/net/can/usb/kvaser_usb.c
- drivers/net/can/usb/peak_usb/pcan_usb_core.c 1 addition, 0 deletionsdrivers/net/can/usb/peak_usb/pcan_usb_core.c
Loading
Please register or sign in to comment