From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796288747; b=BRNSLqem+tUrk20NpsHBp6LkxWA1z8CuyiLh6+ECcwX/8aydr0wj306hissufUtc1iNF GLe++Q+/yUZ0oyAm0Hlb/Qf6Q9038QHFh8KHlZqgFMDDD6zOe/AugciEMPUY+Oh/E/sRS oR7vnHxOoCsZlPzJpD2ZtyMto52+XHkjpcZFM7V10hrNfaQ8/jRHNqCz05XxLk5kF/fDt mv0fVbSEkXiP1BnYa9AugSNGCpWA05HzeHPb8OYAvSnz+kMsZ7iGRxbtmCyJlERZt0oxD oJEZgdyw1jbgbAIR2fC9N5YMBu1q7/ucoNJrgNs4mEmyJW8SUAxvVbLbNjh0VqxBbpA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796288747; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=KA/uiNbEsJHU0kcuXUX14znpFkJUTGmx1Cd2SKFG+B8=; b=j6iLDRFPbARlHhaWmoGHCRoO8k9czFxUmt8RQ+xdTcq9vzM2DJosNssEeB3o6iHozhUg WDTiMquuj+lXiiExJk2ToYmQ8uv5Ajicd0lrg3vB9Gu3aVYBaBAdhdRf7NZ4DQcY2Xh1V LDhpvzAVDJQ7XW523qwJmrncxfR3zZQipOZpXxpNTgo0x22Y9lUPpTRTVfwdE7WQM5308 ST0BvrLo/A/1Griu1Qr6FK0nuYY7/ntiXcJSB0wBjmWcuBJdOgH7FRyRLrXCLTuD/cU+G 83vqWuqvfjzkm7R34KkgfL2xWssjwDEbzhNTcfgoqqX2EfjtUmOfx4eZvMt+aiYBRaA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=KD1loeZ1; arc=none smtp.remote-ip=185.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 6D065606A334 for ; Thu, 3 Dec 2026 09:05:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6D065606A334 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=KD1loeZ1 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 225494E4185B; Thu, 3 Dec 2026 09:05:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D0063604ED; Thu, 3 Dec 2026 09:05:44 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6AB1511EA1893; Thu, 03 Dec 2026 10:05:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796288742; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=KA/uiNbEsJHU0kcuXUX14znpFkJUTGmx1Cd2SKFG+B8=; b=KD1loeZ1IITpq3pIYG6u7lkq93VjOLNrEWI6yPBu3so13T8lo2rHK+LOEDMsrdncZrXC5H BVQxwNgED82AVjDRaCzTlf56uBwHhLFDLmOBBiN4N/XBBAKbQTBWDky0i5pbRTQsUu/Zq2 0K17sgk1bFAKX/w8vPRMYEgzZCMTyeabgXT12YloELGdDexaw1LP3Y5px8ROi5/9mq/cAm mvrK0tpuLyaydtlXo2TjrGK7fGApnsIHA46F194iPxCjtVUffimWJ+BnE7Rm46SgEixdBK RLjCJnqc4dRH6UpxjPwYHyQwMjrNL/YJ3lxCLhgHPziqH1MQa+GLMOwT3QVGeg== Message-ID: <1fcee81f-af10-4428-9317-e5585d0fe519@bootlin.com> Date: Thu, 3 Dec 2026 10:05:33 +0100 X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next] net: stmmac: dwmac-sun8i: set the RX FIFO flow control in the RX mode setup To: Nicolai Buchwitz 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 References: <20261203073137.958539-1-maxime.chevallier@bootlin.com> <8447f007330b046b0e074e0a9950b931@tipi-net.de> From: Maxime Chevallier Content-Language: en-US In-Reply-To: <8447f007330b046b0e074e0a9950b931@tipi-net.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 Hi Nicolai, On 12/3/26 08:59, Nicolai Buchwitz wrote: > 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? Sure, I can 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 arg typos, sorry about that. > >> [...] > >> 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? yes it's fine, I've tested that. As long as TX_FLOW_CTL_EN is clear in TX_FLOW_CTL, we don't emit pause frames so we're all good :) Maxime > >> [...] > > Thanks, > Nicolai