public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Add CONFIG_GMAC_TX_DELAY=4 for OlinuXino Lime2
@ 2016-03-15  5:41 Michael Haas
       [not found] ` <20160315180914.GA1878@excalibur.cnev.de>
  0 siblings, 1 reply; 35+ messages in thread
From: Michael Haas @ 2016-03-15  5:41 UTC (permalink / raw)
  To: u-boot

This change is required to get GBIT Ethernet to work
reliably on my board. Without CONFIG_GMAC_TX_DELAY=4, the connection
suffers severe packet loss and SSH becomes unusable.

--- 192.168.1.1 ping statistics ---
100 packets transmitted, 100 received, 0% packet loss, time 19842ms
rtt min/avg/max/mdev = 0.260/0.334/0.527/0.038 ms

I have also tried CONFIG_GMAC_TX_DELAY=3, which still
yielded 11-13% packet loss.

It's quite possible that A20-OLinuXino-Lime_defconfig also requires
this change, but I do not have a board for testing.

I have tested this change on u-boot 2016.01.

Signed-off-by: Michael Haas <haas@computerlinguist.org>
Tested-by: Michael Haas <haas@computerlinguist.org>
Cc: ijc at hellion.org.uk
Cc: hdegoede at redhat.com
---

 configs/A20-OLinuXino-Lime2_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/A20-OLinuXino-Lime2_defconfig b/configs/A20-OLinuXino-Lime2_defconfig
index b5181c6..f75b191 100644
--- a/configs/A20-OLinuXino-Lime2_defconfig
+++ b/configs/A20-OLinuXino-Lime2_defconfig
@@ -15,3 +15,4 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
 CONFIG_CMD_GPIO=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_GMAC_TX_DELAY=4
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 35+ messages in thread
* [U-Boot] [PATCH] Add CONFIG_GMAC_TX_DELAY=4 for OlinuXino Lime2
@ 2016-03-18 17:33 François-David Collin
  0 siblings, 0 replies; 35+ messages in thread
From: François-David Collin @ 2016-03-18 17:33 UTC (permalink / raw)
  To: u-boot

Hi,

As I?m banging my head on this too, please allow me to provide some details
I got two stable situations :
The Lime2 is connected directly to the Gbit interface of my laptop, speed are OK:

1. The Lime2 is connected directly to the Gbit interface of my laptop

[alarm at lime2 ~]$ iperf3 -s -p 5201
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.137.1, port 58077
[  5] local 192.168.137.58 port 5201 connected to 192.168.137.1 port 58078
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  81.4 MBytes   683 Mbits/sec
[  5]   1.00-2.00   sec  82.2 MBytes   690 Mbits/sec
[  5]   2.00-3.00   sec  85.0 MBytes   713 Mbits/sec
[  5]   3.00-4.00   sec  82.1 MBytes   689 Mbits/sec
[  5]   4.00-5.00   sec  87.9 MBytes   738 Mbits/sec
[  5]   5.00-6.00   sec  78.8 MBytes   661 Mbits/sec
[  5]   6.00-7.00   sec  75.0 MBytes   629 Mbits/sec
[  5]   7.00-8.00   sec  88.4 MBytes   741 Mbits/sec
[  5]   8.00-9.00   sec  69.2 MBytes   581 Mbits/sec
[  5]   9.00-10.00  sec  67.2 MBytes   564 Mbits/sec
[  5]  10.00-10.04  sec  2.82 MBytes   660 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.04  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.04  sec   800 MBytes   669 Mbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.137.1, port 58081
[  5] local 192.168.137.58 port 5201 connected to 192.168.137.1 port 58082
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  5]   0.00-1.00   sec  71.4 MBytes   598 Mbits/sec    0    221 KBytes
[  5]   1.00-2.00   sec  76.0 MBytes   637 Mbits/sec    0    221 KBytes
[  5]   2.00-3.00   sec  76.8 MBytes   645 Mbits/sec    0    221 KBytes
[  5]   3.00-4.00   sec  74.1 MBytes   621 Mbits/sec    0    221 KBytes
[  5]   4.00-5.00   sec  75.0 MBytes   630 Mbits/sec    0    221 KBytes
[  5]   5.00-6.00   sec  69.4 MBytes   582 Mbits/sec    0    221 KBytes
[  5]   6.00-7.03   sec  68.6 MBytes   562 Mbits/sec    0    221 KBytes
[  5]   7.03-8.03   sec  65.3 MBytes   548 Mbits/sec    0    221 KBytes
[  5]   8.03-9.00   sec  64.1 MBytes   552 Mbits/sec    0    221 KBytes
[  5]   9.00-10.00  sec  72.8 MBytes   610 Mbits/sec    0    221 KBytes
[  5]  10.00-10.04  sec  2.27 MBytes   513 Mbits/sec    0    221 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.04  sec   716 MBytes   598 Mbits/sec    0             sender
[  5]   0.00-10.04  sec  0.00 Bytes  0.00 bits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

[alarm at lime2 Dev]$ sudo ./mmio-dump 0x1c20164
01c20164: 00000006
[alarm at lime2 Dev]$ sudo i2cdump -f -y 0 0x34
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: c1 10 00 41 00 00 00 00 00 00 00 00 00 00 00 00    ??.A............
10: 05 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00    ?._.............
20: 00 00 00 1c 00 00 00 16 cb 54 00 00 00 00 00 00    ...?...??T......
30: 60 03 42 c9 45 22 9d 0a a5 1f 68 5f fc 16 00 00    `?B?E"????h_??..
40: 00 00 00 00 60 00 00 00 00 00 00 00 00 00 00 00    ....`...........
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 02    ..............p?
60: dc 0e 3e 08 00 00 00 00 00 00 00 00 00 00 00 00    ??>?............
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 0e    ..............??
80: e0 fd 83 80 32 00 ff 00 00 00 00 00 00 00 00 21    ????2..........!
90: 07 a5 07 07 00 02 00 00 00 00 00 00 00 00 00 00    ????.?..........
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 0c    ..............??
b0: 00 00 00 00 00 00 00 00 00 7f 00 ba 00 00 00 00    .........?.?....
c0: 01 01 02 04 07 0d 10 1a 24 2e 35 3d 49 54 5c 63    ????????$.5=IT\c
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 41 00 80 03 00 00 00 00 00 00 00 00 00 00 00 00    A.??............

2. The Lime2 is connected to one of the 4 Gbit port of my home switch, TX speed are terrible, RX are somewhat OK

[alarm at lime2 ~]$ iperf3 -s -p 5201
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.0.10, port 58657
[  5] local 192.168.0.8 port 5201 connected to 192.168.0.10 port 58658
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   1.00-2.00   sec  49.9 KBytes   409 Kbits/sec
[  5]   2.00-3.00   sec  25.7 KBytes   210 Kbits/sec
[  5]   3.00-4.00   sec  18.5 KBytes   152 Kbits/sec
[  5]   4.00-5.00   sec  17.1 KBytes   140 Kbits/sec
[  5]   5.00-6.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   6.00-7.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   7.00-8.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 bits/sec
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 bits/sec
[  5]  10.00-10.19  sec  0.00 Bytes  0.00 bits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.19  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.19  sec   111 KBytes  89.4 Kbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 192.168.0.10, port 58684
[  5] local 192.168.0.8 port 5201 connected to 192.168.0.10 port 58685
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  5]   0.00-1.01   sec  87.5 MBytes   728 Mbits/sec    0    210 KBytes
[  5]   1.01-2.01   sec  89.3 MBytes   746 Mbits/sec    0    210 KBytes
[  5]   2.01-3.00   sec  84.2 MBytes   710 Mbits/sec    0    221 KBytes
[  5]   3.00-4.00   sec  85.3 MBytes   718 Mbits/sec    0    221 KBytes
[  5]   4.00-5.01   sec  80.3 MBytes   668 Mbits/sec    0    221 KBytes
[  5]   5.01-6.01   sec  88.1 MBytes   741 Mbits/sec    0    221 KBytes
[  5]   6.01-7.00   sec  89.1 MBytes   751 Mbits/sec    0    221 KBytes
[  5]   7.00-8.01   sec  89.5 MBytes   745 Mbits/sec    0    221 KBytes
[  5]   8.01-9.00   sec  83.5 MBytes   708 Mbits/sec    0    221 KBytes
[  5]   9.00-10.00  sec  79.2 MBytes   664 Mbits/sec    0    221 KBytes
[  5]  10.00-10.06  sec  2.75 MBytes   371 Mbits/sec    0    221 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  5]   0.00-10.06  sec   859 MBytes   716 Mbits/sec    0             sender
[  5]   0.00-10.06  sec  0.00 Bytes  0.00 bits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

[alarm at lime2 Dev]$ sudo ./mmio-dump 0x1c20164
01c20164: 00000006
[alarm at lime2 Dev]$ sudo i2cdump -f -y 0 0x34
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: c1 10 00 41 00 00 00 00 00 00 00 00 00 00 00 00    ??.A............
10: 05 00 5f 00 00 00 00 00 00 00 00 00 00 00 00 00    ?._.............
20: 00 00 00 1c 00 00 00 16 cb 54 00 00 00 00 00 00    ...?...??T......
30: 60 03 42 c9 45 22 9d 0a a5 1f 68 5f fc 16 00 00    `?B?E"????h_??..
40: 00 00 00 00 60 00 00 00 00 00 00 00 00 00 00 00    ....`...........
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6c 0a    ..............l?
60: dd 08 3e 08 00 00 00 00 00 00 00 00 00 00 00 00    ??>?............
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 0e    ..............??
80: e0 fd 83 80 32 00 ff 00 00 00 00 00 00 00 00 21    ????2..........!
90: 07 a5 07 07 00 02 00 00 00 00 00 00 00 00 00 00    ????.?..........
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 dd 06    ..............??
b0: 00 00 00 00 00 00 00 00 00 7f 00 ba 00 00 00 00    .........?.?....
c0: 01 01 02 04 07 0d 10 1a 24 2e 35 3d 49 54 5c 63    ????????$.5=IT\c
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 41 00 80 03 00 00 00 00 00 00 00 00 00 00 00 00    A.??............

Hope this helps to pinepoint the source of the problem ?

Regards,
-- 
Fran?ois-David Collin

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2016-03-22  9:50 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15  5:41 [U-Boot] [PATCH] Add CONFIG_GMAC_TX_DELAY=4 for OlinuXino Lime2 Michael Haas
     [not found] ` <20160315180914.GA1878@excalibur.cnev.de>
2016-03-15 20:41   ` Tom Rini
2016-03-16  8:32   ` Michael Haas
2016-03-16  9:29     ` Hans de Goede
2016-03-16 10:53       ` Hans de Goede
     [not found]       ` <20160316203642.GC1817@excalibur.cnev.de>
2016-03-17  5:28         ` Michael Haas
2016-03-17 10:52           ` Hans de Goede
2016-03-17 21:53             ` Michael Haas
2016-03-18  7:41               ` Hans de Goede
     [not found]                 ` <20160318190220.GC1815@excalibur.cnev.de>
2016-03-18 19:06                   ` Michael Haas
2016-03-20  8:36                     ` Michael Haas
2016-03-20 10:05                       ` François-David Collin
2016-03-18 20:32             ` Michael Haas
2016-03-18 21:53             ` Michael Haas
2016-03-19  8:39               ` François-David Collin
2016-03-19  9:32                 ` Hans de Goede
2016-03-19  9:35                   ` Michael Haas
2016-03-19  9:45                   ` Michael Haas
2016-03-19 13:40                   ` Michael Haas
2016-03-19 14:35                     ` François-David Collin
2016-03-20 13:45                     ` Hans de Goede
2016-03-20 15:28                       ` Michael Haas
2016-03-20 18:51                         ` Hans de Goede
     [not found]                           ` <20160321154714.GA4751@excalibur.cnev.de>
2016-03-21 18:57                             ` Michael Haas
2016-03-21 20:59                               ` Hans de Goede
2016-03-21 21:01                                 ` Hans de Goede
2016-03-21 21:47                                   ` Michael Haas
2016-03-21 22:00                                     ` Hans de Goede
2016-03-22  5:12                                       ` Michael Haas
2016-03-22  8:46                                 ` Peter Korsgaard
2016-03-22  8:57                                   ` Hans de Goede
2016-03-22  9:01                                     ` Michael Haas
2016-03-22  9:50                                     ` Peter Korsgaard
     [not found]                             ` <20160321173000.GD4751@excalibur.cnev.de>
2016-03-21 20:56                               ` Hans de Goede
  -- strict thread matches above, loose matches on Subject: below --
2016-03-18 17:33 François-David Collin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox