From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 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== 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== 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 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) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1AB5C606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=lNroO+4I 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) 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: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Date: Thu, 03 Dec 2026 08:59:58 +0100 From: Nicolai Buchwitz To: Maxime Chevallier Cc: Andrew Lunn , Jakub Kicinski , davem@davemloft.net, Eric Dumazet , Paolo Abeni , Simon Horman , Willem de Bruijn , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Maxime Coquelin , Alexandre Torgue , Russell King , Lorenzo Bianconi , thomas.petazzoni@bootlin.com, =?UTF-8?Q?Alexis_Lothor=C3=A9?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH net-next] net: stmmac: dwmac-sun8i: set the RX FIFO flow control in the RX mode setup In-Reply-To: <20261203073137.958539-1-maxime.chevallier@bootlin.com> References: <20261203073137.958539-1-maxime.chevallier@bootlin.com> Message-ID: <8447f007330b046b0e074e0a9950b931@tipi-net.de> X-Sender: nb@tipi-net.de Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 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