RX overrun causes Ethernet to stops working

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

muuu
Posts: 1
Joined: Fri Sep 02, 2016 10:24 am

RX overrun causes Ethernet to stops working

Fri Sep 02, 2016 10:32 am

RX overrun causes Ethernet to stops working

PROBLEM
When overrun is detected(at the same time we have also frame error), board is disconnected from local network, meaning it can not be pinged from local network and can not ping any device on local network.

Board can ping itself (ping localhost).
If we disconnect/connect cable we can see in console output it was correctly detected.

ifconfig -a displays following:

eth0 Link encap:Ethernet HWaddr FC:C2:3D:0A:DF:B4
inet addr:192.168.1.174 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::fec2:3dff:fe0a:dfb4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:48233759 errors:1645 dropped:6 overruns:1645 frame:1645

TX packets:166315683 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3246756895 (3.0 GiB) TX bytes:270748755 (258.2 MiB)
Interrupt:46 Base address:0xc000

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:86274 errors:0 dropped:0 overruns:0 frame:0
TX packets:86274 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10326969 (9.8 MiB) TX bytes:10326969 (9.8 MiB)

Reset of Ethernet phy does not help.
We have try to use Ethernet driver as module; unload and load module does not solve the problem.
We can repeat error if we lower Ethernet speed.

After reboot everything works.

WHAT WE THINK WE HAVE FOUND
When we analyse memory dumps, EMAC status registers, etc our best estimate it that DMA controller can not access bus to copy data from EMAC to memory.

HARDWARE USED
Atmel SAMA5D3 Xplained
Hardware version: http://www.atmel.com/tools/ATSAMA5D3-XPLD.aspx
Linux versions: Linux Alpha3 4.4.16 #7 Fri Aug 12 13:26:58 CEST 2016 armv7l GNU/Linux
Ethernet driver version: comes with kernel

Berta
Hardware version: http://www.acmesystems.it/BERTA-A5-EXT with CPU module http://www.acmesystems.it/acqua
Linux versions: Linux 4.2.6, file system from ACME
Ethernet driver version: comes with kernel

Alpha
Hardware version: Our hardware Alpha 3.0 with CPU module http://www.acmesystems.it/acqua
Linux versions: Linux Alpha3 4.4.16 #7 Fri Aug 12 13:26:58 CEST 2016 armv7l GNU/Linux
Ethernet driver version: https://github.com/linux4sam/linux-at91 ... nce/macb.c

HOW TO REPEAT THE PROBLEM
In our case we have generated 'a lot' of traffic between a Linux PC and embedded board in both directions. Error can be repeated sometimes in a few minutes or in a few hours.

EmbeddedBoardTest.sh
-------------------------------------------------------------------------------
#!/bin/bash

SOCKET_COUNT=20
PORT=2000

while [ $SOCKET_COUNT -gt 0 ]; do
echo "#### open port: $PORT #####"
tail -f data.txt | netcat -l -p $PORT > data.txt &
PORT=$(($PORT+1))
SOCKET_COUNT=$(($SOCKET_COUNT-1))
done

PCTest.sh
-------------------------------------------------------------------------------
#!/bin/bash

SOCKET_COUNT=20
PORT=2000
SERVER_IP=192.168.1.177

while [ $SOCKET_COUNT -gt 0 ]; do
echo "#### count: $SOCKETCOUNT port: $PORT #####"
tail -f data.txt | netcat $SERVER_IP $PORT &
PORT=$(($PORT+1))
SOCKET_COUNT=$(($SOCKET_COUNT-1))
done

while true; do
date >> data.txt
done

Any idea or suggestion how to solve this problem?

Thank you,
Miha

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest