root@(none):~# ifconfig eth0 up
PHY 0:00 not found
eth0: Could not attach to PHY
stmmac_open: Cannot attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
这个总是说找不到phy,但是我ifconfig -a 有能找到eth0
root@(none):~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:80:E1:12:49:0B
inet addr:192.168.1.82 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)
Interrupt:134
lo Link encap:Local Loopback
LOOPBACK MTU:16436 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)
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
是由于获取phy_id出错了,不能正确获取phy的id,所以一直出错。是驱动有点小毛病!