OpenCloudOS-Kernel/drivers/net/can/sja1000
Christopher R. Baker 3e66d0138c 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>
2014-03-17 09:20:16 +01:00
..
Kconfig can: sja1000: fuse of_platform into platform 2014-02-04 10:10:51 +01:00
Makefile can: sja1000: fuse of_platform into platform 2014-02-04 10:10:51 +01:00
ems_pci.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
ems_pcmcia.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
kvaser_pci.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
peak_pci.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
peak_pcmcia.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
plx_pci.c can: populate netdev::dev_id for udev discrimination 2014-03-17 09:20:16 +01:00
sja1000.c can: Unify MTU settings for CAN interfaces 2014-03-17 09:20:16 +01:00
sja1000.h can: sja1000: use common prefix for all sja1000 defines 2013-04-16 12:39:14 +02:00
sja1000_isa.c can: Fix FSF address in file headers 2013-12-17 11:47:21 +01:00
sja1000_platform.c can: sja1000: of: add reg-io-width property for 8, 16 and 32-bit register access 2014-02-06 11:50:57 +01:00
tscan1.c can: remove __dev* attributes 2012-12-03 11:16:11 -08:00