@@ -1718,10 +1718,6 @@ int mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port,
1718
1718
{
1719
1719
int err ;
1720
1720
1721
- /* We reserve a few VLANs to isolate unbridged ports */
1722
- if (vlan -> vid_end >= 4000 )
1723
- return - EOPNOTSUPP ;
1724
-
1725
1721
/* If the requested port doesn't belong to the same bridge as the VLAN
1726
1722
* members, do not support it (yet) and fallback to software VLAN.
1727
1723
*/
@@ -1819,7 +1815,6 @@ int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
1819
1815
const struct switchdev_obj_port_vlan * vlan )
1820
1816
{
1821
1817
struct mv88e6xxx_priv_state * ps = ds_to_priv (ds );
1822
- const u16 defpvid = 4000 + ds -> index * DSA_MAX_PORTS + port ;
1823
1818
u16 pvid , vid ;
1824
1819
int err = 0 ;
1825
1820
@@ -1835,8 +1830,7 @@ int mv88e6xxx_port_vlan_del(struct dsa_switch *ds, int port,
1835
1830
goto unlock ;
1836
1831
1837
1832
if (vid == pvid ) {
1838
- /* restore reserved VLAN ID */
1839
- err = _mv88e6xxx_port_pvid_set (ds , port , defpvid );
1833
+ err = _mv88e6xxx_port_pvid_set (ds , port , 0 );
1840
1834
if (err )
1841
1835
goto unlock ;
1842
1836
}
@@ -2186,20 +2180,6 @@ int mv88e6xxx_port_bridge_leave(struct dsa_switch *ds, int port)
2186
2180
return err ;
2187
2181
}
2188
2182
2189
- static int mv88e6xxx_setup_port_default_vlan (struct dsa_switch * ds , int port )
2190
- {
2191
- struct mv88e6xxx_priv_state * ps = ds_to_priv (ds );
2192
- const u16 pvid = 4000 + ds -> index * DSA_MAX_PORTS + port ;
2193
- int err ;
2194
-
2195
- mutex_lock (& ps -> smi_mutex );
2196
- err = _mv88e6xxx_port_vlan_add (ds , port , pvid , true);
2197
- if (!err )
2198
- err = _mv88e6xxx_port_pvid_set (ds , port , pvid );
2199
- mutex_unlock (& ps -> smi_mutex );
2200
- return err ;
2201
- }
2202
-
2203
2183
static void mv88e6xxx_bridge_work (struct work_struct * work )
2204
2184
{
2205
2185
struct mv88e6xxx_priv_state * ps ;
@@ -2320,7 +2300,7 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
2320
2300
}
2321
2301
2322
2302
/* Port Control 2: don't force a good FCS, set the maximum frame size to
2323
- * 10240 bytes, enable secure 802.1q tags, don't discard tagged or
2303
+ * 10240 bytes, disable 802.1q tags checking , don't discard tagged or
2324
2304
* untagged frames on this port, do a destination address lookup on all
2325
2305
* received packets as usual, disable ARP mirroring and don't send a
2326
2306
* copy of all transmitted/received frames on this port to the CPU.
@@ -2345,7 +2325,7 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
2345
2325
reg |= PORT_CONTROL_2_FORWARD_UNKNOWN ;
2346
2326
}
2347
2327
2348
- reg |= PORT_CONTROL_2_8021Q_SECURE ;
2328
+ reg |= PORT_CONTROL_2_8021Q_DISABLED ;
2349
2329
2350
2330
if (reg ) {
2351
2331
ret = _mv88e6xxx_reg_write (ds , REG_PORT (port ),
@@ -2474,13 +2454,6 @@ int mv88e6xxx_setup_ports(struct dsa_switch *ds)
2474
2454
ret = mv88e6xxx_setup_port (ds , i );
2475
2455
if (ret < 0 )
2476
2456
return ret ;
2477
-
2478
- if (dsa_is_cpu_port (ds , i ) || dsa_is_dsa_port (ds , i ))
2479
- continue ;
2480
-
2481
- ret = mv88e6xxx_setup_port_default_vlan (ds , i );
2482
- if (ret < 0 )
2483
- return ret ;
2484
2457
}
2485
2458
return 0 ;
2486
2459
}
0 commit comments