public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] net: stmmac: Fix VLAN handling when interface is down
@ 2026-02-23 12:40 Ovidiu Panait
  2026-02-23 12:40 ` [PATCH net-next 1/4] net: stmmac: Fix error handling in VLAN add and delete paths Ovidiu Panait
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ovidiu Panait @ 2026-02-23 12:40 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, mcoquelin.stm32,
	alexandre.torgue, linux, rmk+kernel, maxime.chevallier,
	boon.khai.ng, rohan.g.thomas, vladimir.oltean, hayashi.kunihiko,
	matthew.gerlach, vee.khee.wong, boon.leong.ong, kim.tatt.chuah
  Cc: netdev, linux-arm-kernel, linux-stm32, linux-kernel

VLAN register accesses on the MAC side require the PHY RX clock to be
active. When the network interface is down, the PHY is suspended and
the RX clock is unavailable, causing VLAN operations to fail with
timeouts.

The VLAN core automatically removes VID 0 after the interface goes down
and re-adds it when it comes back up, so these timeouts happen during
normal interface down/up:

    # ip link set end1 down
    renesas-gbeth 15c40000.ethernet end1: Timeout accessing MAC_VLAN_Tag_Filter
    renesas-gbeth 15c40000.ethernet end1: failed to kill vid 0081/0

Adding VLANs while the interface is down also fails:

    # ip link add link end1 name end1.10 type vlan id 10
    renesas-gbeth 15c40000.ethernet end1: Timeout accessing MAC_VLAN_Tag_Filter
    RTNETLINK answers: Device or resource busy

Patches 3-4 address this by deferring hardware writes when the
interface is down and reconfiguring the VLAN state on interface up.

Patches 1-2 fix some issues in the existing VLAN implementation.

Ovidiu Panait (4):
  net: stmmac: Fix error handling in VLAN add and delete paths
  net: stmmac: Improve double VLAN handling
  net: stmmac: Add write_hw parameter to VLAN filter operations
  net: stmmac: Defer VLAN HW configuration when interface is down

 drivers/net/ethernet/stmicro/stmmac/hwif.h    |  6 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  1 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 62 ++++++++++++++++---
 .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 51 +++++++++------
 4 files changed, 90 insertions(+), 30 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-02-24  9:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-23 12:40 [PATCH net-next 0/4] net: stmmac: Fix VLAN handling when interface is down Ovidiu Panait
2026-02-23 12:40 ` [PATCH net-next 1/4] net: stmmac: Fix error handling in VLAN add and delete paths Ovidiu Panait
2026-02-23 12:41 ` [PATCH net-next 2/4] net: stmmac: Improve double VLAN handling Ovidiu Panait
2026-02-23 12:41 ` [PATCH net-next 3/4] net: stmmac: Add write_hw parameter to VLAN filter operations Ovidiu Panait
2026-02-23 12:41 ` [PATCH net-next 4/4] net: stmmac: Defer VLAN HW configuration when interface is down Ovidiu Panait
2026-02-23 13:46 ` [PATCH net-next 0/4] net: stmmac: Fix VLAN handling " Russell King (Oracle)
2026-02-24  9:17   ` Ovidiu Panait

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox