From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E75C4606A32D for ; Thu, 3 Dec 2026 09:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=B9p4tssv; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=KD1loeZ1 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=KA/uiNbEsJHU0kcuXUX14znpFkJUTGmx1Cd2SKFG+B8=; b=B9p4tssvBP3qb+ GpRQWh6W+7bJCTyKRkn0jGK1TgTOB7zPqYVmSADLmF4SPI6xNpO8lnbJMpLWoEWYQxWJRZ+23DnQt YafY03Rf+MRrJq8O9St+mHaqPncyclbtOZn8FMuG1qn3vUMB3TwpFU9JOXm0C+O6gYvQgiWAh4Sko ja7+UeAGXTwr8z9vTzxeD9s4FkDqFuV+QtRZkUfyRuckctgafu27iXVJCR7xb+Yb8yLncvr52rOHo ApVAYFzNyRImISIXmidZROcvFhBwSw9XTCYM2sxTSJc4bJioA9IAzrlIZjmNfuFOymjgojOI81stQ 1GqeQop3seH0ZCloHwZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2lD-0000000DwW1-21W6; Thu, 03 Dec 2026 09:05:51 +0000 Received: from smtpout-03.galae.net ([185.246.85.4]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2lA-0000000DwU2-3Per for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 09:05:50 +0000 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-Archived-By: 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_010548_993924_B0BBF863 X-CRM114-Status: GOOD ( 15.57 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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