[PATCH net-next 2/9] net: dsa: microchip: remove VLAN operations for ksz8463

From: Bastien Curutchet

Date: Tue May 26 2026 - 05:49:49 EST


From: Vladimir Oltean <vladimir.oltean@xxxxxxx>

KSZ8463 uses the common KSZ8 implementation for its VLAN operations.
This implementation returns -ENOTSUPP for the KSZ8463 case, which is
pointless.

Remove the VLAN operations from the ksz8463_switch_ops so the core can
directly return -ENOTSUPP.

Signed-off-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@xxxxxxxxxxx>
---
drivers/net/dsa/microchip/ksz8.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/ksz8.c
index db08874eb025..93e0b3f60448 100644
--- a/drivers/net/dsa/microchip/ksz8.c
+++ b/drivers/net/dsa/microchip/ksz8.c
@@ -1477,7 +1477,7 @@ static int ksz8_port_vlan_filtering(struct dsa_switch *ds, int port, bool flag,
{
struct ksz_device *dev = ds->priv;

- if (ksz_is_ksz88x3(dev) || ksz_is_ksz8463(dev))
+ if (ksz_is_ksz88x3(dev))
return -ENOTSUPP;

/* Discard packets with VID not enabled on the switch */
@@ -1514,7 +1514,7 @@ static int ksz8_port_vlan_add(struct dsa_switch *ds, int port,
u16 data, new_pvid = 0;
u8 fid, member, valid;

- if (ksz_is_ksz88x3(dev) || ksz_is_ksz8463(dev))
+ if (ksz_is_ksz88x3(dev))
return -ENOTSUPP;

/* If a VLAN is added with untagged flag different from the
@@ -1584,7 +1584,7 @@ static int ksz8_port_vlan_del(struct dsa_switch *ds, int port,
u8 fid, member, valid;
u16 data, pvid;

- if (ksz_is_ksz88x3(dev) || ksz_is_ksz8463(dev))
+ if (ksz_is_ksz88x3(dev))
return -ENOTSUPP;

ksz_pread16(dev, port, REG_PORT_CTRL_VID, &pvid);
@@ -2439,9 +2439,6 @@ const struct dsa_switch_ops ksz8463_switch_ops = {
.port_pre_bridge_flags = ksz_port_pre_bridge_flags,
.port_bridge_flags = ksz_port_bridge_flags,
.port_fast_age = ksz8_flush_dyn_mac_table,
- .port_vlan_filtering = ksz8_port_vlan_filtering,
- .port_vlan_add = ksz8_port_vlan_add,
- .port_vlan_del = ksz8_port_vlan_del,
.port_fdb_dump = ksz8_fdb_dump,
.port_fdb_add = ksz8_fdb_add,
.port_fdb_del = ksz8_fdb_del,

--
2.54.0