* [PATCH net-next v2] vlan: remove MII ioctl forwarding
@ 2026-11-15 8:53 Hungyu Lin
2026-11-18 1:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Hungyu Lin @ 2026-11-15 8:53 UTC (permalink / raw)
To: davem
Cc: edumazet, kuba, pabeni, horms, yuantan098, n05ec, ylong030,
andrew, f.fainelli, netdev, linux-kernel, dennylin0707
VLAN devices forward SIOCGMIIPHY, SIOCGMIIREG and SIOCSMIIREG to the
lower device. This exposes the lower device's PHY through the VLAN
even when the two devices are in different network namespaces.
Bonding used MII ioctls as a fallback for link monitoring. Commit
23a6037ce76c ("bonding: Remove support for use_carrier") removed
that fallback.
Remove vlan_dev_ioctl() and its ndo_eth_ioctl hook so MII ioctls on
VLAN devices return -EOPNOTSUPP. Applications that need PHY access
can issue these ioctls on the lower device.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
v2:
- Remove MII ioctl forwarding entirely and target net-next.
v1: https://lore.kernel.org/netdev/20261106124639.12584-1-dennylin0707@gmail.com/
net/8021q/vlan_dev.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index bca0a3693636..cff36d3fc6c8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -406,29 +406,6 @@ static int vlan_hwtstamp_set(struct net_device *dev,
return generic_hwtstamp_set_lower(real_dev, cfg, extack);
}
-static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
- struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
- struct ifreq ifrr;
- int err = -EOPNOTSUPP;
-
- strscpy_pad(ifrr.ifr_name, real_dev->name, IFNAMSIZ);
- ifrr.ifr_ifru = ifr->ifr_ifru;
-
- switch (cmd) {
- case SIOCGMIIPHY:
- case SIOCGMIIREG:
- case SIOCSMIIREG:
- err = dev_eth_ioctl(real_dev, &ifrr, cmd);
- break;
- }
-
- if (!err)
- ifr->ifr_ifru = ifrr.ifr_ifru;
-
- return err;
-}
-
static int vlan_dev_neigh_setup(struct net_device *dev, struct neigh_parms *pa)
{
struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
@@ -1105,7 +1082,6 @@ static const struct net_device_ops vlan_netdev_ops = {
.ndo_set_rx_mode = vlan_dev_set_rx_mode,
.ndo_change_rx_flags = vlan_dev_change_rx_flags,
.ndo_work = vlan_dev_work,
- .ndo_eth_ioctl = vlan_dev_ioctl,
.ndo_neigh_setup = vlan_dev_neigh_setup,
.ndo_get_stats64 = vlan_dev_get_stats64,
#if IS_ENABLED(CONFIG_FCOE)
base-commit: d1f4b7c6b997c29de67ad7178ababac2328cb1b4
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next v2] vlan: remove MII ioctl forwarding
2026-11-15 8:53 [PATCH net-next v2] vlan: remove MII ioctl forwarding Hungyu Lin
@ 2026-11-18 1:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-18 1:40 UTC (permalink / raw)
To: Hungyu Lin
Cc: davem, edumazet, kuba, pabeni, horms, yuantan098, n05ec, ylong030,
andrew, f.fainelli, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sun, 15 Nov 2026 08:53:43 +0000 you wrote:
> VLAN devices forward SIOCGMIIPHY, SIOCGMIIREG and SIOCSMIIREG to the
> lower device. This exposes the lower device's PHY through the VLAN
> even when the two devices are in different network namespaces.
>
> Bonding used MII ioctls as a fallback for link monitoring. Commit
> 23a6037ce76c ("bonding: Remove support for use_carrier") removed
> that fallback.
>
> [...]
Here is the summary with links:
- [net-next,v2] vlan: remove MII ioctl forwarding
https://git.kernel.org/netdev/net-next/c/fbf9026e3503
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-18 1:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-15 8:53 [PATCH net-next v2] vlan: remove MII ioctl forwarding Hungyu Lin
2026-11-18 1:40 ` patchwork-bot+netdevbpf
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.