Skip to content

net: stmmac: dwmac-sun8i: enable Flow Control

Maxime Chevallier linux-arm-kernel linux-sunxi lkml netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 6 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: stmmac: dwmac-sun8i: allow controlling TX and RX flow control separatelydrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c+2 -22 repliesApplied
2/3net: stmmac: dwmac-sun8i: emit pause frames when the RX FIFO fillsdrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c+17 -03 repliesApplied
3/3net: stmmac: dwmac-sun8i: configure the pause time for TX flow controldrivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c+6 -31 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchNicolai BuchwitzChen-Yu Tsai
1/3R-b R-b
2/3R-b R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/3] net: stmmac: dwmac-sun8i: enable Flow Control

While running the "ethtool -t" selftests on H2+ (orangepi zero), the Flow Control selftests consistently fails.

I originally blamed that on the fact that the board was connected to a peer that didn't support Pause and that we didn't negotiate Pause at all.

The ethtool selftest are sensitive to what the Peer advertises even though this is a full loopback test, but it is what it is :(

Since then, the orangepi zero I'm testing dwmac-sun8i on has been wired to a proper peer, and the selftest still fails. This selftest sends tons of frames in loopback and checks that Pause frames are generated, and failing it means no pause frames were sent by the MAC.

Turns out, multiple things were missing in the dwmac-sun8i implementation to get Flow Control to work.

Patch 1 allows independently setting RX/TX FC

Patch 2 is the one making FC actually work, by configuring the fifo thresholds

Patch 3 sets the quanta values in the frames.

This seems to have never worked, so since it's not fixing a regression I'm targetting net-next here.

This was tested only on H2+.

Thanks,

Maxime

Maxime Chevallier (3):
net: stmmac: dwmac-sun8i: allow controlling TX and RX flow control
separately
net: stmmac: dwmac-sun8i: emit pause frames when the RX FIFO fills
net: stmmac: dwmac-sun8i: configure the pause time for TX flow control

 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 30 +++++++++++++++----
 1 file changed, 25 insertions(+), 5 deletions(-)
Signature · 1 line
2.56.1