summaryrefslogtreecommitdiff
path: root/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules
blob: 5426544f2f5781418480fce8f5d4c859b08ecce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#To add new rule for new device you have to run (in case if you want to add eth1 interface)
#admin@mtcdt:~# udevadm info --attribute-walk --path=/sys/class/net/eth1
# looking at device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0/net/eth1':
#    KERNEL=="eth1"
#    SUBSYSTEM=="net"
#    DRIVER==""
#    ATTR{mtu}=="1500"
#    ATTR{type}=="1"
#    ...........
#    ...........

#  looking at parent device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0':
#    KERNELS=="1-2.1.1:1.0"  <------------------- extract this record to add to the rule
#    SUBSYSTEMS=="usb"
#    DRIVERS=="smsc75xx"
#    ATTRS{bInterfaceClass}=="ff"
#    ATTRS{bInterfaceSubClass}=="00"
#    ...........

# Four port to four port hub case
#   1-2.1:1.0  eth1  (Only in four port case)
#   1-2.2:1.0  eth2  (Matches eth1 in the two port case)
#
# Four port to two port hub case
#   1-2.2:1.0 eth1 (matches eth2 in the four port case)
#   1-2.3:1.0 eth2 (only in two port case)
#
SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", RUN+="/etc/udev/scripts/mtcdt_eth_rename.sh"