ls1021a-twr etsec3 RGMII Tx is failing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ls1021a-twr etsec3 RGMII Tx is failing

675 Views
sanjaytandel
Contributor II

Hi,

 

Board: Freescale LayerScape LS1021E, Version: 2.0

Using SERDES1 Protocol: 112 (0x70)

 

We have loaded sdk2.0 Linux kernel (version 4.1.8-rt8) using our custom boot-loader. Board is up without any error in boot messages. eth2(which is eTSEC3 RGMII) uses PHY1 and is configured with static IP address. But I am unable to ping to/from baord. Though, I can see Rx/Tx packets and interrupt count getting incremented:

 

-------------------------------------------------------------------------------

# ifconfig
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.16.1 netmask 255.255.255.0 broadcast 0.0.0.0
ether 00:04:9f:03:64:e6 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
device base 0xc000

eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.52 netmask 255.255.255.0 broadcast 0.0.0.0
ether 00:04:9f:03:ec:8d txqueuelen 1000 (Ethernet)
RX packets 4962 bytes 612643 (598.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 18 bytes 756 (756.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device base 0xa000

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
RX packets 10 bytes 1120 (1.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10 bytes 1120 (1.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

 

-------------------------------------------------------------------------------

 

 

Then I tried to run tcpdump to capture the packets(and wireshark on host) while I was ping the board(192.168.2.52) from another host machine(192.168.2.1):

 

-------------------------------------------------------------------------------

00:21:15.901900 ARP, Request who-has 192.168.2.52 tell 192.168.2.1, length 46
0x0000: ffff ffff ffff 8cae 4cf9 6779 0806 0001 ........L.gy....
0x0010: 0800 0604 0001 8cae 4cf9 6779 c0a8 0201 ........L.gy....
0x0020: 0000 0000 0000 c0a8 0234 0000 0000 0000 .........4......
0x0030: 0000 0000 0000 0000 0000 0000 ............
00:21:15.902352 ARP, Reply 192.168.2.52 is-at 00:04:9f:03:ec:8d (oui Freescale), length 28
0x0000: 8cae 4cf9 6779 0004 9f03 ec8d 0806 0001 ..L.gy..........
0x0010: 0800 0604 0002 0004 9f03 ec8d c0a8 0234 ...............4
0x0020: 8cae 4cf9 6779 c0a8 0201 ..L.gy....

-------------------------------------------------------------------------------

 

As per above tcp dumps , It looks like board can receive the ARP packet and create correct ARP reply message. But reply never reaches the network and I don't see any ARP reply packet on wireshark(which is running on host). Meaning board can Rx the packes , but Tx is failing.(though I can't see any error message related to Tx failing and everything looks normal)

 

 

 

Below is ethtool o/p:

-------------------------------------------------------------------------------

Settings for eth2:
Supported ports: [ MII ]
Supported link modes: 10baseT/Half 10baseT/Full 
100baseT/Half 100baseT/Full 
1000baseT/Full 
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full 
100baseT/Half 100baseT/Full 
1000baseT/Full 
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full 
100baseT/Half 100baseT/Full 
1000baseT/Full 
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Supports Wake-on: g
Wake-on: d
Current message level: 0x0000003f (63)
drv probe link timer ifdown ifup
Link detected: yes

-----------------------------------------------------------------------------------------

 

Also, I have attached eTSEC3 reg. settings here.

 

I have gone through NXP community discussions and verified all settings suggested related to eTSEC in previous discussions.

 

Am I missing some setting related to eTSEC, PHY or DMA configuration.?

 

Regards,

Sanjay

Tags (3)
0 Kudos
Reply
1 Reply

502 Views
sanjaytandel
Contributor II

I have fixed this issue by adding Phy Init sequence in our boot loader.

regards,

Sanjay

0 Kudos
Reply