From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796288747; b=nSXOInx2PC/4LeldDuj9O9YvkReWMq7dyZO1oKEeKhPl6a4klU2yjc1+fjLjm7Fu47TN 95aSvxMalFsoowYD6VcxV6oySPUguJjXw1ADjcnH9NNS2wNHVjN9aIV+WnmsNq+9/QwK6 837z9Tsw64RxG3/Js1hadks3oJekAE7FnOZdi3eGulpoVUegOhnWpeqxw/kdIfQrJLoeP /6qY56hT/xIqcBybH399JKuOgv/yw74gQJyDhhXmSVb7aYwhSH9No6K67kNeudGwE9f5C em4CH0+KE4VEN4LLM7w6/BIxXUL3RnvZVTHzKaSQ83c4GMFsR/vqCgp49S1avBpEPyw== 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=yYoZLSzO+yJ+HOEiM6l2mJFKWzt8ObpEMd30O/SD25nJ7obIPknXQUt8b0+dasdiof5Z 6KSKENFxatjmROt/4MK18htPed6QDTUFZbY+t8X8+0KCYG0FR6VTuCcgScWpOYCQfBXlk +aGbh/sPsv/+/jna95XeHOVWLIvwQ49QLPPQHFvTyCt2mVYzfJzStyF98HLL/kZEePvbA ds/G050K6Yu4V5PH4eptcwNIh126IpL9z0Mbfwshyc70hJ35c7Qz6Yk7DOFzMpZod9w1s VU0QrTlz9keStZSoTKbAW1UNCGuW4D6ValXWLHdd0NZISNq0f7QetSVvwbRLgTilBtw== 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.84.56 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 9FA8C606A32D; Thu, 3 Dec 2026 09:05:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9FA8C606A32D 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-02.galae.net (Postfix) with ESMTPS id 1F6011A1908; 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: netdev@vger.kernel.org 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