Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: netdev@vger.kernel.org,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Chen-Yu Tsai <wens@kernel.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-sunxi@lists.linux.dev
Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all
Date: Sun, 22 Nov 2026 19:38:57 +0100	[thread overview]
Message-ID: <ba116748-1650-4816-97a6-69eeecd4b2cb@lunn.ch> (raw)
In-Reply-To: <20261122-submit-sun8i-rxall-v1-v1-2-607789772c56@gmail.com>

> +static void sun8i_dwmac_update_rx_ctl1(struct stmmac_priv *priv, u32 clear, u32 set)
>  {
> +	struct sunxi_priv_data *gmac = priv->plat->bsp_priv;
>  	u32 v;
>  
> -	v = readl(ioaddr + EMAC_RX_CTL1);
> -	v |= EMAC_RX_DMA_START;
> -	v |= EMAC_RX_DMA_EN;
> -	writel(v, ioaddr + EMAC_RX_CTL1);
> +	guard(spinlock_irqsave)(&gmac->rx_ctl1_lock);
> +	v = readl(priv->ioaddr + EMAC_RX_CTL1);
> +	writel((v & ~clear) | set, priv->ioaddr + EMAC_RX_CTL1);

Netdev does not like these magical guard constructs. scoped_guard is
acceptable, but good old fashioned lock/unlock is preferred.

It is also unclear why this now needs locks, when before it did not.

This patch is too big, does too many things. Please break it up into
smaller changes, with good commit messages, which are obviously
correct.

	Andrew

  reply	other threads:[~2026-11-22 18:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  7:45 [PATCH net-next 0/2] net: stmmac: support ethtool rx-all on sun8i James Hilliard
2026-11-22  7:45 ` [PATCH net-next 1/2] net: stmmac: add common RXALL handling James Hilliard
2026-11-22  7:45 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-11-22 18:38   ` Andrew Lunn [this message]
2026-11-22 20:05     ` James Hilliard
2026-11-22 20:57       ` Andrew Lunn
2026-11-22 18:41   ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2026-11-20 15:32 [PATCH net-next 0/2] net: stmmac: handle RX checksum and wire errors on sun8i James Hilliard
2026-11-20 15:32 ` [PATCH net-next 2/2] net: stmmac: dwmac-sun8i: support ethtool rx-all James Hilliard
2026-11-20 18:30   ` Maxime Chevallier
2026-11-20 18:46     ` James Hilliard
2026-11-24 15:47   ` netdev-bot+sashiko

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=ba116748-1650-4816-97a6-69eeecd4b2cb@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=james.hilliard1@gmail.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=samuel@sholland.org \
    --cc=wens@kernel.org \
    /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