This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
My understanding is that the TI driver has no control over the interface naming. The driver requests a name from the kernel during driver initialization. Your question is interesting in that how are you getting eth2 for your USB network?
Best Regards,
Schuyler
HI,
Our initial board included one ethernet port "eth0".
We have added to the board a USB hub which outputs with 4 USB ports and 2 Ethernet ports.
The 2 ethernet ports were given the following names "eth1', "eth2"
This was our requirement for ethernet ports naming convention. We were unaware about the dual MAC solution so we used 'eth1" for an ethernet port that comes out from the HUB we added.
The ports were assigned these name by specifying some rules in the udev rules file /etc/udev/rules.d/autonet.rules.
Please refer to udev and udev rules in internet.
Here is some piece of rules which identify the ethernet ports by vendor id & product id and assign it the required name by some filters.
66ACTION=="move|add", KERNEL!="eth1", ATTRS{idVendor}=="0424", ATTRS{idProduct}=="9e00", \ 67 DEVPATH=="/devices/platform/ocp/????????.usb/????????.usb/musb-hdrc.1/usb2/2-1/2-1.1/2-1.1:1.0/net/*", \ 68 NAME="eth1", TAG+="systemd", ENV{SYSTEMD_ALIAS}="", \ 69 GOTO="ltr_end" 70ACTION=="move|add", KERNEL=="eth1", ATTRS{idVendor}=="0424", ATTRS{idProduct}=="9e00", \ 71 DEVPATH=="/devices/platform/ocp/????????.usb/????????.usb/musb-hdrc.1/usb2/2-1/2-1.1/2-1.1:1.0/net/*", \ 72 TAG+="systemd", RUN+="/bin/systemctl start --no-block eth1-networks.service", \ 73 GOTO="ltr_end" 74ACTION=="move|add", KERNEL!="eth2", ATTRS{idVendor}=="0424", ATTRS{idProduct}=="9e00", \ 75 DEVPATH=="/devices/platform/ocp/????????.usb/????????.usb/musb-hdrc.1/usb2/2-1/2-1.3/2-1.3:1.0/net/*", \ 76 NAME="eth2", TAG+="systemd", ENV{SYSTEMD_ALIAS}="", \ 77 GOTO="ltr_end" 78ACTION=="move|add", KERNEL=="eth2", ATTRS{idVendor}=="0424", ATTRS{idProduct}=="9e00", \ 79 DEVPATH=="/devices/platform/ocp/????????.usb/????????.usb/musb-hdrc.1/usb2/2-1/2-1.3/2-1.3:1.0/net/*", \ 80 TAG+="systemd", RUN+="/bin/systemctl start --no-block eth2-networks.service", \ 81 GOTO="ltr_end"
The idea is detect the port and assign it the name you want.
This is what needs to be done for the additional ethernet port that we have added now to our new board. We do not want to change the naming for the previous ethernet ports, so I need to detect what are the filters to detect the new ethernet port.
I have replied you and for some reason my reply was identified as spam. I have asked to recover the reply.
The idea for assigning a name for interface is to use udev rules. Please refer to udev and udev rules in internet.
I have specified the rules in my "spam" reply. I hope the reply will be recovered and than it will become clear.