NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-arm/53216 (sunxi awge is unreliable at gigabit speed)



Synopsis: sunxi awge is unreliable at gigabit speed

State-Changed-From-To: open->feedback
State-Changed-By: skrll%NetBSD.org@localhost
State-Changed-When: Mon, 18 Oct 2021 07:41:25 +0000
State-Changed-Why:
Is this still a problem? I see these changes that might help your problem

revision 1.67
date: 2019-10-15 18:19:05 +0100;  author: tnn;  state: Exp;  lines: +4 -5;  commitid: eOp1fNcFFCQafZGB;
correct pointer arithmetics
----------------------------
revision 1.66
date: 2019-10-15 17:30:49 +0100;  author: tnn;  state: Exp;  lines: +28 -14;  commitid: t0ylgdxkVARbYYGB;
awge: fix issue that caused rx packets to be corrupt with DIAGNOSTIC kernel

It seems the hardware can only reliably do rx DMA to addresses that are
dcache size aligned. This is hinted at by some GMAC data sheets but hard to
find an authoritative source.

on non-DIAGNOSTIC kernels we always implicitly get MCLBYTES-aligned mbuf
data pointers, but with the reintroduction of POOL_REDZONE for DIAGNOSTIC
we can get 8-byte alignment due to redzone padding. So align rx pointers to
64 bytes which should be good for both arm32 and aarch64.

While here change some bus_dmamap_load() to bus_dmamap_load_mbuf() and add
one missing bus_dmamap_sync(). Also fixes the code to not assume that
MCLBYTES == AWGE_MAX_PACKET. User may override MCLSHIFT in kernel config.





Home | Main Index | Thread Index | Old Index