Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
resources:tools-software:linux-drivers:net-mac-phy:adin1110 [12 May 2022 13:22] Alexandru Tachiciresources:tools-software:linux-drivers:net-mac-phy:adin1110 [05 Oct 2022 17:27] – Added udev rules example Alexandru Tachici
Line 150: Line 150:
  Link detected: yes  Link detected: yes
 </code> </code>
 +
 +==== Example: Renaming ethernet interface ====
 +Renaming an ethernet interface from the generic ethx name to a custom name is done by adding a udev rule.
 +Check:
 +<code>
 +/sys/class/net/<iface>/phys_switch_id
 +</code>
 +
 +Create a .rules file under:
 +<code>
 +/etc/udev/rules.d/
 +</code>
 +
 +Coppy the phys_switch_id to the bellow udev rule:
 +
 +<code>
 +root@analog:/sys/class/net/eth1# cat /etc/udev/rules.d/54-adin-net.rules
 +SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}=="6164696e313131302d30", ATTR{phys_port_name}!="", NAME="adin1110-$attr{phys_port_name}"
 +</code>
 +
 +phys_switch_id can differ from device to device. It is a unique identifier for each device on that specific system.
  
 ==== Example: changing link autonegotiation ==== ==== Example: changing link autonegotiation ====
resources/tools-software/linux-drivers/net-mac-phy/adin1110.txt · Last modified: 26 May 2023 21:41 by Brandon Bushey