public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/5] net: stmmac: Fix VLAN handling when interface is down
@ 2026-02-25 14:24 Ovidiu Panait
  2026-02-25 14:24 ` [PATCH net-next v2 1/5] net: stmmac: Fix error handling in VLAN add and delete paths Ovidiu Panait
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Ovidiu Panait @ 2026-02-25 14:24 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,
	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 4-5 address this by deferring hardware writes when the
interface is down and reconfiguring the VLAN state on interface up.

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

v2 changes:
- Added a new commit that fixes VLAN restore on the resume and open paths.

v1: https://lore.kernel.org/all/20260223124102.120432-1-ovidiu.panait.rb@renesas.com/


Ovidiu Panait (5):
  net: stmmac: Fix error handling in VLAN add and delete paths
  net: stmmac: Improve double VLAN handling
  net: stmmac: Fix VLAN HW state restore
  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 | 69 ++++++++++++++++---
 .../net/ethernet/stmicro/stmmac/stmmac_vlan.c | 61 ++++++++--------
 4 files changed, 95 insertions(+), 42 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-03-03  0:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-25 14:24 [PATCH net-next v2 0/5] net: stmmac: Fix VLAN handling when interface is down Ovidiu Panait
2026-02-25 14:24 ` [PATCH net-next v2 1/5] net: stmmac: Fix error handling in VLAN add and delete paths Ovidiu Panait
2026-02-25 14:24 ` [PATCH net-next v2 2/5] net: stmmac: Improve double VLAN handling Ovidiu Panait
2026-02-25 14:24 ` [PATCH net-next v2 3/5] net: stmmac: Fix VLAN HW state restore Ovidiu Panait
2026-02-25 14:24 ` [PATCH net-next v2 4/5] net: stmmac: Add write_hw parameter to VLAN filter operations Ovidiu Panait
2026-02-28 19:04   ` Jakub Kicinski
2026-03-02 21:59     ` Ovidiu Panait
2026-03-03  0:08       ` Jakub Kicinski
2026-02-25 14:24 ` [PATCH net-next v2 5/5] net: stmmac: Defer VLAN HW configuration when interface is down Ovidiu Panait

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