[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251113112721.70500-1-ovidiu.panait.rb@renesas.com>
Date: Thu, 13 Nov 2025 11:27:19 +0000
From: Ovidiu Panait <ovidiu.panait.rb@...esas.com>
To: andrew+netdev@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
mcoquelin.stm32@...il.com,
alexandre.torgue@...s.st.com,
rmk+kernel@...linux.org.uk,
maxime.chevallier@...tlin.com,
boon.khai.ng@...era.com
Cc: netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net-next v2 0/2] net: stmmac: Disable EEE RX clock stop when VLAN is enabled
Hi,
This series fixes a couple of VLAN issues observed on the Renesas RZ/V2H
EVK platform (stmmac + Microchip KSZ9131RNXI PHY):
- The first patch fixes a bug where VLAN ID 0 would not be properly removed
due to how vlan_del_hw_rx_fltr() matched entries in the VLAN filter table.
- The second patch addresses RX clock gating issues that occur during VLAN
creation and deletion when EEE is enabled with RX clock-stop active (the
default configuration). For example:
# 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
The stmmac hardware requires the receive clock to be running when writing
certain registers, including VLAN registers. 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.
A more comprehensive overview of receive clock related issues in the
stmmac driver can be found here:
https://lore.kernel.org/all/Z9ySeo61VYTClIJJ@shell.armlinux.org.uk/
Most of the issues were resolved by commit dd557266cf5fb ("net: stmmac:
block PHY RXC clock-stop"), which wraps register accesses with
phylink_rx_clk_stop_block()/unblock() calls. However, VLAN add/delete
operations are invoked with bottom halves disabled, where sleeping is
not permitted, so those helpers cannot be used.
To avoid these VLAN timeouts, the second patch disables the EEE RX
clock-stop feature when VLAN support is enabled. This ensures the receive
clock remains active, allowing VLAN operations to complete successfully.
Best regards,
Ovidiu
v2:
- Added comment mentioning that EEE RX clock stop is disabled to allow
access to VLAN registers.
- Added "Reviewed-by" tag from Russell.
Ovidiu Panait (2):
net: stmmac: Fix VLAN 0 deletion in vlan_del_hw_rx_fltr()
net: stmmac: Disable EEE RX clock stop when VLAN is enabled
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++++-
drivers/net/ethernet/stmicro/stmmac/stmmac_vlan.c | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
--
2.51.0
Powered by blists - more mailing lists