TI中文支持网
TI专业的中文技术问题搜集分享网站

AM3352 CPSW驱动 网卡正常但ping不通

各位好:

        我们使用的AM3352的CPU,现在在我司的板上程序运行起来后,网卡状态都是正常的,可以收到广播包,但是别的机器ping不通板,板也ping不通别的机器,感觉就是发不出包,请各位帮忙分析看看,先谢了。

      开发包:ti-processor-sdk-linux-am335x-evm-01.00.00.03-Linux-x86-Install.bin

      网络芯片:DP83848J

      驱动:cpsw

      文件系统:initramfs,使用arago-base-tisdk-image-am335x-evm.tar.gz解压过后编译到内核

      启动方式:netboot

      网卡模式:MII

      PHYID:7

      dtb:见附件

      启动后,网卡的信息如下(MAC地址是我在u-boot里面用代码设置的):

eth0 Link encap:Ethernet HWaddr 00:84:00:16:05:05 inet addr:192.168.10.106 Bcast:192.168.10.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:16150 errors:0 dropped:506 overruns:0 frame:0
TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 RX bytes:1212788 (1.1 MiB) TX bytes:6412 (6.2 KiB)
Interrupt:56

lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:365 errors:0 dropped:0 overruns:0 frame:0
TX packets:365 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 RX bytes:34428 (33.6 KiB) TX bytes:34428 (33.6 KiB)

ethtool查看eth0信息如下:

Settings for eth0:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Link partner advertised pause frame use: Transmit-only
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 7
Transceiver: external
Auto-negotiation: on
Supports Wake-on: d
Wake-on: d
Current message level: 0x00000000 (0)
Link detected: yes

从另外一台机器(192.168.10.12)ping开发板(192.168.10.106),在192.168.10.106上抓包信息如下:

root@am335x-evm:~# tcpdump -X -e src 192.168.10.102
[ 6470.201984] device eth0 entered promiscuous mode
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
[ 6474.246760] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=73
[ 6474.256142] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=101
[ 6474.266497] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=73
[ 6474.275735] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=101
[ 6474.286839] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=73
[ 6474.296107] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=101
[ 6474.305978] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=73
[ 6474.315166] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=101
22:02:44.783510 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
[ 6477.330449] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=73
[ 6477.339802] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=101
[ 6477.350065] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=73
[ 6477.359290] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=101
22:02:48.129067 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype IPv4 (0x0800), length 92: 192.168.10.102.netbios-ns > 192.168.10.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
0x0000: 4500 004e c9e4 0000 4011 1a05 c0a8 0a66 E..N….@……f
0x0010: c0a8 0aff 0089 0089 003a 1b25 e914 0110 ………:.%….
0x0020: 0001 0000 0000 0000 2045 4545 4b46 4545 ………EEEKFEE
0x0030: 4646 4446 4543 4e46 4145 4443 4143 4143 FFDFECNFAEDCACAC
0x0040: 4143 4143 4143 4141 4100 0020 0001 ACACACAAA…..
22:02:50.283527 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:02:55.783581 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:01.283672 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:06.783694 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:12.283814 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:17.783859 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:23.283902 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:28.783951 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:34.284006 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:39.784038 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
INIT: Id "1" respawning too fast: disabled for 5 minutes
22:03:45.284112 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:50.784213 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:03:56.284270 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:01.784322 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:07.284342 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:12.784427 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:18.284482 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
[ 6573.106878] IPv4: ip_rcv : 90-2b-34-af-71-32 192.168.10.98 —-> ff-ff-ff-ff-ff-ff 192.168.10.255 len=78
[ 6573.117001] UDP: udp_rcv 192.168.10.98:137 —-> 192.168.10.255:137 len=58
22:04:23.784562 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, eth[ 6573.485364] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=72
ertype ARP (0x0806), length 60: Request who-has 192.168.10.106 t[ 6573.499009] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=100
ell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c9[ 6573.514641] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=72
7 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 000[ 6573.528287] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=100
0 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:24.350105 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.98 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a62 0000 0000 .f………b….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:29.284643 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:34.784680 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:40.284726 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:45.784774 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:51.284873 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:04:56.784918 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:02.284995 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:07.785042 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:13.285123 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:18.785189 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:23.785249 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:29.285300 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:34.785366 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:40.285386 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:45.785460 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
[ 6657.515281] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=72
[ 6657.524646] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=100
[ 6657.535003] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=72
[ 6657.544241] ip_output : 00-00-00-00-00-00 127.0.0.1 —-> 00-00-00-00-00-00 127.0.0.1 len=100
22:05:47.738772 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.57 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a39 0000 0000 .f………9….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:51.285492 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:05:56.785542 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:06:02.285610 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:06:07.785666 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:06:13.285714 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
22:06:18.785800 3c:97:0e:ae:4d:1d (oui Unknown) > Broadcast, ethertype ARP (0x0806), length 60: Request who-has 192.168.10.106 tell 192.168.10.102, length 46
0x0000: 0001 0800 0604 0001 3c97 0eae 4d1d c0a8 ……..<…M…
0x0010: 0a66 0000 0000 0000 c0a8 0a6a 0000 0000 .f………j….
0x0020: 0000 0000 0000 0000 0000 0000 0000 …………..
^C
43 packets captured[ 6691.436444] device eth0 left promiscuous mode

使用TI官方的dtb和上述内核,加载到TI官方的Demo板,网卡状态正常,也可以ping通。

Mark Liao:

arp信息补充如下

root@am335x-evm:~# arp -n? (192.168.10.1) at 00:0f:e2:54:01:ff [ether] on eth0? (192.168.10.98) at <incomplete> on eth0? (192.168.10.86) at 00:1d:09:04:a1:19 [ether] on eth0? (192.168.10.102) at 3c:97:0e:ae:4d:1d [ether] on eth0

Mark Liao:

回复 Mark Liao:

TI的技术大神呢?能帮忙看看么?我司单板驱动往dma写数据时,mdio寄存器值如下:

ctrl=0x410000ffalive=0xff000fflink=0xfc000e6linkintraw=0x1userintmaskset=0x0userintraw=0x1linkintmasked=0x1userintmaskset=0x0userintmaskclr=0x0user[0].access=0x208701e1user[0].physel=0x47

phy 寄存器值如下:

BMCR =0x3100MII_BMSR =0x786dMII_PHYSID1 =0x2000MII_PHYSID2 =0x5c90MII_ADVERTISE =0x1e1MII_LPA =0xc9e1MII_EXPANSION =0xfMII_ANPTR =0x2801MII_PHY_STS =0x4015MII_PHYADDR =0x8027

Jian Zhou:

回复 Mark Liao:

请问有在U-boot下试过网络基本功能么?MDIO访问PHY芯片都是正常的?

Mark Liao:

回复 Jian Zhou:

u-boot下网卡收发是正常的,我是从网络启动的,u-boot从网口加载kernel然后启动系统。

u-boot下mido和phy寄存器如下:

ctrl=0x410000ff alive=0xff000ff link=0xfc000e6 linkintraw=0x0 userintmaskset=0x0 userintraw=0x1 linkintmasked=0x0 userintmaskset=0x0 userintmaskclr=0x0 user[0].access=0x22074615 user[0].physel=0x0 nBMCR =0x3100 nMII_BMSR =0x786d nMII_PHYSID1 =0x2000 nMII_PHYSID2 =0x5c90 nMII_ADVERTISE =0x1e1 nMII_LPA =0xc9e1 nMII_EXPANSION =0xd nMII_ANPTR =0x2801 nMII_PHY_STS =0x4615 nMII_PHYADDR =0x8027

Kernel下mdio和phy寄存器如下:

ctrl=0x410000ff alive=0xff000ff link=0xfc000e6 linkintraw=0x0 userintmaskset=0x0 userintraw=0x1 linkintmasked=0x0 userintmaskset=0x0 userintmaskclr=0x0 user[0].access=0x208701e1 user[0].physel=0x0 nBMCR =0x3100 nMII_BMSR =0x786d nMII_PHYSID1 =0x2000 nMII_PHYSID2 =0x5c90 nMII_ADVERTISE =0x1e1 nMII_LPA =0xc9e1 nMII_EXPANSION =0xf nMII_ANPTR =0x2801 nMII_PHY_STS =0x4015 nMII_PHYADDR =0x8027

是否和电源管理有关?我们的单板是固定电压,没有电源管理芯片。

Jian Zhou:

回复 Mark Liao:

如果U-boot下网络工作正常,硬件出问题的可能性不大。

kernel下有量那些信号线有数据输出和输入么?

另外检查下kernel下是否关掉了防火墙。

Mark Liao:

回复 Jian Zhou:

用示波器测量TX数据线没有信号输出,u-boot的TX数据线有信号,这个和防火墙有关?

Mark Liao:

回复 Mark Liao:

防火墙没有编译进内核,但是相同的内核,可以在TI官方的Demo板跑起来,而且网口收发正常。

Mark Liao:

回复 Mark Liao:

内核开了防火墙,其结果一样,user[0].access=0x208701e1这个寄存器的值在u-boot和kernel下不一样,看手册貌似和电源管理有关

Jian Zhou:

回复 Mark Liao:

如果TX信号输出都没有,建议检查下kernel下的pinmux设置。

Mark Liao:

回复 Jian Zhou:

完整的dts文件在1楼的附件中,pinmux设置如下,网卡为MII模式 gmii_sel寄存器已设置为0,这个引脚设置和u-boot一样,只是我们的没有电源管理,所以sleep的没有设置。另外帮忙检查下dts文件中双网卡设置,我们的单板am3352接DP83848J的PHY芯片(PHYID=7)和和IP175D(PHYID=4)交换芯片。谢了。

cpsw_default: cpsw_default { pinctrl-single,pins = < /* Slave 1 */ 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */ 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_rxdv.mii1_rxdv */ 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */ 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */ 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */ 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */ 0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txclk.mii1_txclk */ 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_rxclk.mii1_rxclk */ 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_rxd3.mii1_rxd3 */ 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_rxd2.mii1_rxd2 */ 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_rxd1.mii1_rxd1 */ 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mii1_rxd0.mii1_rxd0 */

/* Slave 2 */ 0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_a0.mii2_txen */ 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* gpmc_a1.mii2_rxdv */ 0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_a2.mii2_td3 */ 0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_a3.mii2_td2 */ 0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_a4.mii2_td1 */ 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_a5.mii2_td0 */ 0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* gpmc_a6.mii2_tclk */ 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* gpmc_a7.mii2_rclk */ 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* gpmc_a8.mii2_rd3 */ 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* gpmc_a9.mii2_rd2 */ 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE1) /* gpmc_a10.mii2_rd1 */ 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE1) /* gpmc_a11.mii2_rd0 */ >; };

cpsw_sleep: cpsw_sleep { pinctrl-single,pins = < /* Slave 1 reset value */ 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)

/* Slave 2 reset value*/ 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7) 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7) >; };

系统启动打印的phy信息如下(IP175D的驱动还没加载):

[ 4.145526] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown[ 4.153587] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown[ 4.161628] davinci_mdio 4a101000.mdio: phy[2]: device 4a101000.mdio:02, driver unknown[ 4.169682] davinci_mdio 4a101000.mdio: phy[3]: device 4a101000.mdio:03, driver unknown[ 4.177736] davinci_mdio 4a101000.mdio: phy[4]: device 4a101000.mdio:04, driver unknown[ 4.185788] davinci_mdio 4a101000.mdio: phy[5]: device 4a101000.mdio:05, driver unknown[ 4.193841] davinci_mdio 4a101000.mdio: phy[6]: device 4a101000.mdio:06, driver unknown[ 4.201882] davinci_mdio 4a101000.mdio: phy[7]: device 4a101000.mdio:07, driver NatSemi DP83848J[ 4.210719] davinci_mdio 4a101000.mdio: phy[20]: device 4a101000.mdio:14, driver unknown[ 4.218859] davinci_mdio 4a101000.mdio: phy[21]: device 4a101000.mdio:15, driver unknown[ 4.226999] davinci_mdio 4a101000.mdio: phy[22]: device 4a101000.mdio:16, driver unknown[ 4.235138] davinci_mdio 4a101000.mdio: phy[23]: device 4a101000.mdio:17, driver unknown[ 4.243278] davinci_mdio 4a101000.mdio: phy[24]: device 4a101000.mdio:18, driver unknown[ 4.251406] davinci_mdio 4a101000.mdio: phy[25]: device 4a101000.mdio:19, driver unknown[ 4.259545] davinci_mdio 4a101000.mdio: phy[26]: device 4a101000.mdio:1a, driver unknown[ 4.267684] davinci_mdio 4a101000.mdio: phy[27]: device 4a101000.mdio:1b, driver unknown

赞(0)
未经允许不得转载:TI中文支持网 » AM3352 CPSW驱动 网卡正常但ping不通
分享到: 更多 (0)