Linux網卡異常問題:ethernet eth0: no PHY

平臺:IMX6Q

系統:Linux V3.14.28

異常日誌信息如下:

Configuring network interfaces... [    7.228356] fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
[    7.236055] libphy: PHY fixed-0:00 not found
[    7.240334] fec 2188000.ethernet eth0: could not attach to PHY
ifconfig: SIOCSIFFLAGS: No such device
[    7.261377] fec 2188000.ethernet eth0: no PHY, assuming direct connection to switch
[    7.269110] libphy: PHY fixed-0:00 not found
[    7.273390] fec 2188000.ethernet eth0: could not attach to PHY
ifconfig: SIOCSIFFLAGS: No such device

route: SIOCADDRT: Network is unreachable

這個總是說找不到phy,但是我ifconfig -a 有能找到eth0

root@M6708-T:~# ifconfig -a
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:142 


can1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:143 


eth0      Link encap:Ethernet  HWaddr 00:14:97:1A:2A:28  
          inet addr:192.168.1.136  Bcast:192.168.1.255  Mask:255.255.255.0
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:700 (700.0 B)  TX bytes:700 (700.0 B)


sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

解決辦法:

網卡分爲兩個層次:MAC+PHY
一般說來,MAC就是網絡控制器,如果該驅動OK,就能看到ifconfig信息;
PHY是物理層,負責發送和傳輸的底層,如果PHY發生問題,ifconfig同樣有信息,只有up時纔會連接PHY。
MAC和PHY通過MII接口傳輸以太網數據,通過MDIO接口訪問PHY的配置寄存器。 PHY連不上
第一可能是硬件問題,拿給做硬件的,檢查一下PHY結果所有信號都很正常。。。。

待更新。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章