ZHCAES5 July   2024 DP83822H , DP83822HF , DP83822I , DP83822IF , DP83826E , DP83826I , DP83848-EP , DP83848Q-Q1 , DP83867CR , DP83867CS , DP83867E , DP83867IR , DP83867IS , DP83TC812R-Q1 , DP83TC812S-Q1 , DP83TC813R-Q1 , DP83TC813S-Q1 , DP83TC814R-Q1 , DP83TC814S-Q1 , DP83TG720R-Q1 , DP83TG720S-Q1 , DP83TG721R-Q1 , DP83TG721S-Q1

 

  1.   1
  2.   摘要
  3.   商标
  4. 1德州仪器 (TI) 以太网 PHY 驱动程序
  5. 2以太网 PHY 驱动程序概述
    1. 2.1 了解 Linux 驱动程序类型
      1. 2.1.1 U-Boot 驱动程序
      2. 2.1.2 内核驱动程序
  6. 3驱动程序集成
    1. 3.1 Linux 器件树
    2. 3.2 集成式驱动程序
  7. 4常见终端命令
    1. 4.1 初始化命令
      1. 4.1.1 dmesg | grep -i mdio
      2. 4.1.2 ifconfig
    2. 4.2 功能命令
      1. 4.2.1 Phytool
      2. 4.2.2 ethtool
      3. 4.2.3 强制执行主/从配置
    3. 4.3 诊断命令
      1. 4.3.1 SQI
      2. 4.3.2 TDR
      3. 4.3.3 吞吐量测试 - ping 和 iPerf
  8. 5总结
  9. 6参考资料

ifconfig

ifconfig(区分大小写)是一个 Linux 终端命令,可显示网络接口,还可用于确定是否正确加载了驱动程序。ifconfig -ethx down 停用接口,而 ifconfig -ethx up 激活接口;这将再次加载驱动程序,类似电路板初次通电时。

root@j7-evm:~# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:f9:5b:d7:a4  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
        ether 34:08:e1:59:5c:d2  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
        ether d2:eb:75:2d:68:21  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536  metric 1
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 82  bytes 6220 (6.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 82  bytes 6220 (6.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0