๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26200

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

#26200
From: Nicolai Buchwitz
Date: Thu, 03 Dec 2026 07:59
43 lines
10219 bytes
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
Technical Details
Message-ID: <8447f007330b046b0e074e0a9950b931@tipi-net.de>
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376384-linux-kernel-netdev=dewy.ru
References: <20261203073137.958539-1-maxime.chevallier@bootlin.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376384-linux-kernel-netdev=dewy.ru
From: nb@tipi-net.de (Nicolai Buchwitz)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next] net: stmmac: dwmac-sun8i: set the RX FIFO flow
 control in the RX mode setup
Date: Thu, 03 Dec 2026 08:59:58 +0100
Organization: Usenet Network
Message-ID: <8447f007330b046b0e074e0a9950b931@tipi-net.de>
References: <20261203073137.958539-1-maxime.chevallier@bootlin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
 format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2430457"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kxGKkTYkMG5kQ04LpT90eXnBYow= sha256:NSGCNp3s8jZbk7DHCQjGcpFO8IdenHi92baRLKkExMY=
	sha1:WXiWz8RBEcxKymCHz4fj8IWpLw4= sha256:jsVIyi+N/Jfw8VxvF4xSJwON+l66sQ59MUz+s7WipIg=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 0A340117871; Thu,  3 Dec 2026 11:00:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=tipi-net.de
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id a1E5YJb9VH90;
	Thu,  3 Dec 2026 11:00:21 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376384-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 92B7C11786C; Thu,  3 Dec 2026 11:00:12 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id BA874262E2; Thu,  3 Dec 2026 08:00:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796284808;
	b=zKkrvXXqNe9qKqelokwlYrPrJQWxUM2a3vTS05iK89ClgVO5p0Lq56e9byC5WyXCc36j
	 OgItPEBn8q3ywvpVL7M4Qb04xei++vjr8i/RLDCO56Q0uAcJP35DtVNAsAhq2WK4hMkGI
	 AnKCOTvJ3KDo8XIMZPBHM1puYr9K9Hh9sK6Zxar2YkXUeSe1Ky0fGOTyHkDrTSA1G33KL
	 F2/CWjP6hjkagnKTuYNP4ndEBe8cq6EI2ZydZZD9cYH0lgK23td7L8vy0As1uMPICPROz
	 js7eSet279htyeh4SfHfQTWxUYALmxurI3yjF0n9mp35lY0i6fWFTOku3uVfXEXAk3g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796284808;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=Bft0HpthCjMkE7AkI+KAP7J+gP5F+UCVH3aU1snhioU=;
	b=H2z3oHhfgbnkW63sr9AL+AcISm/J/WS1xFhaEejQlBgMhTagTc06C+q2CTXw4KAgF57V
	 LUc2jlc2YxZ5O7U3W+RdzYwYSUROk8e1UcjIWU3KiwJJVKphj2Mc3vwOVWm98yR8oAWm3
	 QCrQ/tYYNkR9fZmtXVaBI/QXh9IVogPyswZ4zCWw3n9yaWliepcDLEUmAzSnj97tK/4fw
	 Q4ZpODbEBsUaI6NSe0iP8BVIbpGb/1CTy0H9ImO7jutV7ArjI0A7FAM/yo6ri+XkrHqGF
	 ULd45M+OidVlCvifRHwuYCAxCI4krGYm8XCiIPocdbt28qHf1OSBWfKTl7N+mt8V1eQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=lNroO+4I;
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B8F7606A33A;
	Thu,  3 Dec 2026 08:00:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=lNroO+4I
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796284807;
	b=PZ9bUpEhbQtzpabyKMVCY/hc2nXimE529wZqYzBUQxOyHhUggiAx2YD1fi4N81O27x9B
	 ntcsSUITWCsMzl6W71Jkp4l1RPz/pnQ2kJfqLeDhAjP86LCpDgUZi7hj3KC1RomoKLuoz
	 eNF6+E/wb0Ae/t9lW7EXWXmKCj/srhYjnG+y6un9aH9m0ADuv8L6Ct1/GiG3hF95R98i2
	 6aRyJAPfeG6Noj+hENtDIVsc1p7QDwRzdNHWzxIgnsYOF295TEWz+h7u1IUD3rZo+7OWG
	 pUY3XU7kFOVJAh0C8ug0wcF09J8QustXD33MgyqIO802h4E4mKi0ytoSwhfn3pGr6Hg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796284807;
	h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc:
	 Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type:
	 Content-Transfer-Encoding:X-Last-TLS-Session-Version;
	bh=Bft0HpthCjMkE7AkI+KAP7J+gP5F+UCVH3aU1snhioU=;
	b=ICOVUsMQlFABrJhYjNDEGz99I6T4w+z2QtWwCnIS75kqIUZ2lZfbvZGqzSazsxgul7in
	 E3rXzvcijeE4gB8qKJj2HYAWEZct9xAYBgxeugPcpDa1IY9fGlb1K+ASl1sFz1XMlGCX2
	 9BmNULX4EdGid/oPEnzyXfDuPSZKJ1KzcIdDQutVD5TKOaqLEsHLI3dnIFO3jh0w0aA7N
	 2r4yeHEtKdXyyXOoQ64GeS5K1IUZTnN5cvIeghM3NVM9YZ1V98HvL3Fu0EXRPaVmNaipM
	 oCAsguMV5Rc/EiD4lRRWdKCT+TGtzb5JlFyyM4U6CS0Yuhy/lAcGcoKnPnxOMemvKog==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=tipi-net.de;
	spf=pass smtp.mailfrom=tipi-net.de;
	dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=lNroO+4I;
	arc=none smtp.remote-ip=194.13.80.246
X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AB5C606A32D;
	Thu,  3 Dec 2026 08:00:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1AB5C606A32D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de
X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4660CA2B82;
	Thu, 03 Dec 2026 08:59:58 +0100 (CET)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim;
	t=1796284803; h=from:subject:date:message-id:to:cc:mime-version:content-type:
	 content-transfer-encoding:in-reply-to:references;
	bh=Bft0HpthCjMkE7AkI+KAP7J+gP5F+UCVH3aU1snhioU=;
	b=lNroO+4IdnfHW0q0OWY51pmvTve96LPUs2QNz3JqhElo9Z0XW8Dwmubg3cO5EWUUPYR3O2
	YUBjSNE9uW9XfSfYuBu+8wux4dA1V4K3gXwFJ+FYV3mi01Tz41jpI4xNTMrisuqA1lcDoy
	cg+xQNTpn3IxZhk7xM3O7cDPZe4Ig1v2Jr5gpzSbdt+IugakWPP6CFY58I9iUGOHU7GuXV
	Vyrv0uFKUEu/d/fwxFB5nXfgk0zWVaGFcm4pM7dEUUaXVm3XsUcRNNe2tVfNVG0dV0IxRU
	iWBpuPRwa/2o/ltlLb5YCjbz6fQhdvFR/U0/2hM2m45qOFPV+Pwpckw3XiYfHQ==
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
 davem@davemloft.net, Eric Dumazet <edumazet@kernel.org>, Paolo Abeni
 <pabeni@redhat.com>, Simon Horman <horms@kernel.org>, Willem de Bruijn
 <willemb@google.com>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec
 <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org>, Maxime
 Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue
 <alexandre.torgue@foss.st.com>, Russell King <linux@armlinux.org.uk>,
 Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
 thomas.petazzoni@bootlin.com, Alexis Lothorรฉ
 <alexis.lothore@bootlin.com>, netdev@vger.kernel.org,
 linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
 linux-sunxi@lists.linux.dev
X-In-Reply-To: <20261203073137.958539-1-maxime.chevallier@bootlin.com>
X-Sender: nb@tipi-net.de
X-Last-TLS-Session-Version: TLSv1.3