linux-stable/drivers/net/dsa
Vladimir Oltean e6224d9bcf net: dsa: felix: fix tagging protocol changes with multiple CPU ports
[ Upstream commit 00fa91bc9c ]

When the device tree has 2 CPU ports defined, a single one is active
(has any dp->cpu_dp pointers point to it). Yet the second one is still a
CPU port, and DSA still calls ->change_tag_protocol on it.

On the NXP LS1028A, the CPU ports are ports 4 and 5. Port 4 is the
active CPU port and port 5 is inactive.

After the following commands:

 # Initial setting
 cat /sys/class/net/eno2/dsa/tagging
 ocelot
 echo ocelot-8021q > /sys/class/net/eno2/dsa/tagging
 echo ocelot > /sys/class/net/eno2/dsa/tagging

traffic is now broken, because the driver has moved the NPI port from
port 4 to port 5, unbeknown to DSA.

The problem can be avoided by detecting that the second CPU port is
unused, and not doing anything for it. Further rework will be needed
when proper support for multiple CPU ports is added.

Treat this as a bug and prepare current kernels to work in single-CPU
mode with multiple-CPU DT blobs.

Fixes: adb3dccf09 ("net: dsa: felix: convert to the new .change_tag_protocol DSA API")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20220412172209.2531865-1-vladimir.oltean@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-20 09:36:18 +02:00
..
b53 net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
hirschmann net: dsa: hellcreek: Add missing PTP via UDP rules 2021-12-14 18:46:29 -08:00
microchip net: dsa: microchip: add spi_device_id tables 2022-03-14 10:08:08 +00:00
mv88e6xxx net: dsa: mv88e6xxx: Enable port policy support on 6097 2022-04-08 13:58:03 +02:00
ocelot net: dsa: felix: fix tagging protocol changes with multiple CPU ports 2022-04-20 09:36:18 +02:00
qca net: dsa: ar9331: register the mdiobus under devres 2022-02-08 20:30:34 -08:00
realtek net: dsa: realtek: make interface drivers depend on OF 2022-04-20 09:36:06 +02:00
sja1105 flow_offload: add index to flow_action_entry structure 2021-12-19 14:08:47 +00:00
xrs700x net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
bcm_sf2.c net: dsa: bcm_sf2: don't use devres for mdiobus 2022-02-08 20:30:34 -08:00
bcm_sf2.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
bcm_sf2_cfp.c net: dsa: bcm_sf2_cfp: fix an incorrect NULL check on list iterator 2022-04-08 13:58:35 +02:00
bcm_sf2_regs.h net: dsa: bcm_sf2: refactor LED regs access 2021-12-30 17:28:32 -08:00
dsa_loop.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
dsa_loop.h
dsa_loop_bdinfo.c
Kconfig net: dsa: realtek-smi: move to subdirectory 2022-04-08 13:58:12 +02:00
lan9303-core.c net: dsa: lan9303: add VLAN IDs to master device 2022-02-17 09:32:13 -08:00
lan9303.h net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_i2c.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lan9303_mdio.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
lantiq_gswip.c net: dsa: lantiq_gswip: fix use after free in gswip_remove() 2022-02-16 20:39:13 -08:00
lantiq_pce.h
Makefile net: dsa: realtek-smi: move to subdirectory 2022-04-08 13:58:12 +02:00
mt7530.c net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate() 2022-03-08 12:12:25 +01:00
mt7530.h net: dsa: mt7530: manually set up VLAN ID 0 2021-08-25 11:09:31 +01:00
mv88e6060.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
mv88e6060.h
qca8k.c net: dsa: add a "tx_fwd_offload" argument to ->port_bridge_join 2021-12-08 14:31:16 -08:00
qca8k.h net: dsa: qca8k: add LAG support 2021-11-23 11:53:16 +00:00
vitesse-vsc73xx-core.c net: dsa: vsc73xxx: Get rid of duplicate of_node assignment 2021-12-03 14:13:02 +00:00
vitesse-vsc73xx-platform.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
vitesse-vsc73xx-spi.c net: dsa: be compatible with masters which unregister on shutdown 2021-09-19 12:08:37 +01:00
vitesse-vsc73xx.h net: dsa: vsc73xxx: Make vsc73xx_remove() return void 2021-11-15 13:15:07 +00:00