mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Nicolai Buchwitz <nb@tipi-net.de>
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
Subject: Re: [PATCH net-next] net: stmmac: dwmac-sun8i: set the RX FIFO flow control in the RX mode setup
Date: Thu, 3 Dec 2026 10:05:33 +0100	[thread overview]
Message-ID: <1fcee81f-af10-4428-9317-e5585d0fe519@bootlin.com> (raw)
In-Reply-To: <8447f007330b046b0e074e0a9950b931@tipi-net.de>

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


  reply	other threads:[~2026-12-03  9:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  7:31 Maxime Chevallier
2026-12-03  7:59 ` Nicolai Buchwitz
2026-12-03  9:05   ` Maxime Chevallier [this message]
2026-12-03  9:26     ` Nicolai Buchwitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1fcee81f-af10-4428-9317-e5585d0fe519@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=alexis.lothore@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux@armlinux.org.uk \
    --cc=lorenzo.bianconi@oss.qualcomm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=samuel@sholland.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wens@kernel.org \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®