[LEDE-DEV] [PATCH] ar8327: Add workarounds for AR8337 switch.

Vittorio G (VittGam) openwrt at vittgam.net
Sun Mar 26 00:50:45 PDT 2017


Hello,

On 25/03/2017 23:36:03 CET, Mathias Kresin wrote:
> 25.03.2017 18:08, Vittorio Gambaletta (VittGam):
>> Backported from Code Aurora QSDK
>>
>> Signed-off-by: Vittorio Gambaletta <openwrt at vittgam.net>
> 
> Please describe in the commit message what kind of issues need a 
> workaround. Yes, I noticed the comments in the patch, but nevertheless 
> it should go into the commit message.

Ok, I will do it.

> IMHO the changes to the HOL register need an explanation. At least I've 
> no idea what the magic values mean and what kind of issue is fixed by 
> applying them.

They should help in packet flood conditions. In my tests, port 5
stopped freezing when there's a small packets flood after having
applied both the HOL changes and the RGMII RX delay change, and
removed the ar8327 reserved register fixups from ar8337.

By the way, the values are not magic; they set the quantity of buffers
that can be used for ports and relative priorities. The default
for all ports is 0x2A for every port and 0x8 for all queues of every
port. (Values are then multiplied by 8 to get the applied values.)
This means that the patch will slightly reduce buffers per port, and
distribute them for the various available priorities (0-5 for ports
0,5,6 and 0-3 for ports 1,2,3,4).

The HOL_CTRL1 lines instead simply restore the default values.

These changes make sense to me, and they actually solved my problem
with port 5 hanging in flood conditions; that's why I included them
in this patch (after decoding the "magic" unexplained values in the
QSDK commit and mapping them to the right defines).

Cheers,
Vittorio

> Mathias
> 
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



More information about the Lede-dev mailing list