
On Thu, Feb 15, 2018 at 3:32 PM, André Przywara andre.przywara@arm.com wrote:
Hi,
thanks for picking this up!
(CC:ing Icenowy, who was engaged in a Linux fix for this issue last year [2][3]. It's Chinese New Year though, so not sure how quickly she will answer).
On 14/02/18 23:02, kevans@FreeBSD.org wrote:
The Pine64 has a known issue on gigabit links (see [1]); some boards suffer significant packet loss on Gigabit links.
Do you have a faulty board at hand? What is the actual effect in U-Boot? IIRC the bug "just" causes a slower connection in Gigabit mode, I am not sure we care so much in U-Boot? Or is it actually packages dropped, which is much more annoying without TCP covering up for this?
I do. =) My board in particular sees 60-70% packet loss without this, making netboot incredibly unreliable.
This patch sets the magical bits in CONFREG on the RTL8211E PHY to turn off the internal delay and do some other undocumented stuff.
So if I remember the discussion correctly, this workaround affects the performance of the "good" boards. Have you checked this? There was a discussion last year [2][3] about how to fix this in Linux, which definitely involved some DT property (ideally in the PHY node). This would allow people to turn this on and off depending on their particular board. I am not sure this discussion lead anywhere, though, it might be a good idea to warm this up again.
Unfortunately, I do not have a good board to test with, so I've no idea what it ends up doing to performance. for them.
I think rgmii-txid is actually not right for this. As an aside, I've pulled this value from [1]. The value they ended up going with (as seen in this patch and in [1]) turns off both TXID and RXID (IIRC, from the realtek documentation for this PHY), leaving us with just plain ol' "rgmii" with no internal delay at all. [1] also applies it unconditionally for pine64.
[1] https://github.com/longsleep/linux-pine64/commit/ffe3ca5be7682bbeb0fdadede29...