]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dsa: microchip: remove VLAN operations for ksz8463
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 8 Jun 2026 14:10:05 +0000 (16:10 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jun 2026 01:08:06 +0000 (18:08 -0700)
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@nxp.com>
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20260608-clean-ksz-3rd-v2-2-6e61b7be23c4@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz8.c

index 8046c8a94bc6d5cd7c4565011387187e7ec16e88..9161326b34fd7d5511cf0da2fcbff3b3b4166671 100644 (file)
@@ -1562,7 +1562,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 */
@@ -1599,7 +1599,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
@@ -1669,7 +1669,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);
@@ -2528,9 +2528,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,