[PATCH net-next] net: stmmac: dwmac-sun8i: set the RX FIFO flow control in the RX mode setup

Nicolai Buchwitz nb at tipi-net.de
Wed Dec 2 23:59:58 PST 2026


Hi Maxime

On 3.12.2026 08:31, Maxime Chevallier wrote:

> [...]

> Let's move the threshold setup in the DMA configuration path, making it
> the only piece of code that touches this register. This is OK, as we
> just set the thresholds, we don't change the FC status. That's also
> what's done in other glues.

nit: IMHO other functions still touch this register, maybe reword?

> 
> The thresholds are now configured unconditionnally, that's also OK as
> it doesn't affect anything else that TX FC, and only if it's enabled in
> HW.

unconditionnally -> unconditionally, that -> than

> [...]

> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 
> b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> index 613199da57c1..5a660d22b219 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
> @@ -562,6 +562,12 @@ static void 
> sun8i_dwmac_dma_operation_mode_rx(struct stmmac_priv *priv,
>  		else if (mode < 128)
>  			v |= EMAC_RX_TH_128;
>  	}
> +
> +	v &= ~(EMAC_RX_FLOW_CTL_TH_ACT | EMAC_RX_FLOW_CTL_TH_DEACT);
> +	v |= EMAC_RX_FIFO_FLOW_CTL |

This bit is now always set. Is that fine with TX pause off?

> [...]

Thanks,
Nicolai



More information about the linux-arm-kernel mailing list