All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Ovidiu Panait <ovidiu.panait.rb@renesas.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
	alexandre.torgue@foss.st.com, maxime.chevallier@bootlin.com,
	boon.khai.ng@altera.com, netdev@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: stmmac: Disable EEE RX clock stop when VLAN is enabled
Date: Tue, 11 Nov 2025 09:48:53 +0000	[thread overview]
Message-ID: <aRMGhXohIK5swFSM@shell.armlinux.org.uk> (raw)
In-Reply-To: <20251111093000.58094-3-ovidiu.panait.rb@renesas.com>

On Tue, Nov 11, 2025 at 09:30:00AM +0000, Ovidiu Panait wrote:
> On the Renesas RZ/V2H EVK platform, where the stmmac MAC is connected to a
> Microchip KSZ9131RNXI PHY, creating or deleting VLAN interfaces may fail
> with timeouts:
> 
>     # ip link add link end1 name end1.5 type vlan id 5
>     15c40000.ethernet end1: Timeout accessing MAC_VLAN_Tag_Filter
>     RTNETLINK answers: Device or resource busy
> 
> Disabling EEE at runtime avoids the problem:
> 
>     # ethtool --set-eee end1 eee off
>     # ip link add link end1 name end1.5 type vlan id 5
>     # ip link del end1.5
> 
> The stmmac hardware requires the receive clock to be running when writing
> certain registers, such as those used for MAC address configuration or
> VLAN filtering. However, by default the driver enables Energy Efficient
> Ethernet (EEE) and allows the PHY to stop the receive clock when the link
> is idle. As a result, the RX clock might be stopped when attempting to
> access these registers, leading to timeouts and other issues.
> 
> Commit dd557266cf5fb ("net: stmmac: block PHY RXC clock-stop")
> addressed this issue for most register accesses by wrapping them in
> phylink_rx_clk_stop_block()/phylink_rx_clk_stop_unblock() calls.
> However, VLAN add/delete operations may be invoked with bottom halves
> disabled, where sleeping is not allowed, so using these helpers is not
> possible.
> 
> Therefore, to fix this, disable the RX clock stop feature in the phylink
> configuration if VLAN features are set. This ensures the RX clock remains
> active and register accesses succeed during VLAN operations.
> 
> Signed-off-by: Ovidiu Panait <ovidiu.panait.rb@renesas.com>

Thanks for the patch. I guess there is no other way around this, since
as I've previously noted (and as you say above) we can't sleep in the
VLAN ops to access the PHY.

I would like a comment in the code above this if() to state that EEE
RX clock stop is disabled to allow access to VLAN registers to work.
With that added, please add:

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!


      reply	other threads:[~2025-11-11  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11  9:29 [PATCH net-next 0/2] net: stmmac: Disable EEE RX clock stop when VLAN is enabled Ovidiu Panait
2025-11-11  9:29 ` [PATCH net-next 1/2] net: stmmac: Fix VLAN 0 deletion in vlan_del_hw_rx_fltr() Ovidiu Panait
2025-11-14 10:09   ` Simon Horman
2025-11-11  9:30 ` [PATCH net-next 2/2] net: stmmac: Disable EEE RX clock stop when VLAN is enabled Ovidiu Panait
2025-11-11  9:48   ` Russell King (Oracle) [this message]

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=aRMGhXohIK5swFSM@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=boon.khai.ng@altera.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ovidiu.panait.rb@renesas.com \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.