linux-stable/drivers/net/dsa
Arınç ÜNAL 120a56b01b net: dsa: mt7530: fix network connectivity with multiple CPU ports
On mt753x_cpu_port_enable() there's code that enables flooding for the CPU
port only. Since mt753x_cpu_port_enable() runs twice when both CPU ports
are enabled, port 6 becomes the only port to forward the frames to. But
port 5 is the active port, so no frames received from the user ports will
be forwarded to port 5 which breaks network connectivity.

Every bit of the BC_FFP, UNM_FFP, and UNU_FFP bits represents a port. Fix
this issue by setting the bit that corresponds to the CPU port without
overwriting the other bits.

Clear the bits beforehand only for the MT7531 switch. According to the
documents MT7621 Giga Switch Programming Guide v0.3 and MT7531 Reference
Manual for Development Board v1.0, after reset, the BC_FFP, UNM_FFP, and
UNU_FFP bits are set to 1 for MT7531, 0 for MT7530.

The commit 5e5502e012 ("net: dsa: mt7530: fix roaming from DSA user
ports") silently changed the method to set the bits on the MT7530_MFC.
Instead of clearing the relevant bits before mt7530_cpu_port_enable()
which runs under a for loop, the commit started doing it on
mt7530_cpu_port_enable().

Back then, this didn't really matter as only a single CPU port could be
used since the CPU port number was hardcoded. The driver was later changed
with commit 1f9a6abecf ("net: dsa: mt7530: get cpu-port via dp->cpu_dp
instead of constant") to retrieve the CPU port via dp->cpu_dp. With that,
this silent change became an issue for when using multiple CPU ports.

Fixes: 5e5502e012 ("net: dsa: mt7530: fix roaming from DSA user ports")
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-05-05 09:22:04 +01:00
..
b53 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-30 14:43:03 -07:00
hirschmann net: dsa: hellcreek: Get rid of custom led_init_default_state_get() 2023-03-16 17:02:56 -07:00
microchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-04-20 16:29:51 -07:00
mv88e6xxx net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu 2023-04-28 09:57:32 +01:00
ocelot net: mscc: ocelot: add support for preemptible traffic classes 2023-04-17 19:01:19 -07:00
qca net: dsa: qca8k: fix LEDS_CLASS dependency 2023-04-21 20:26:41 -07:00
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-30 14:43:03 -07:00
sja1105 net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
xrs700x net: dsa: xrs700x: Convert to i2c's .probe_new() 2022-11-23 12:50:06 -08:00
bcm_sf2.c net: dsa: bcm_sf2: remove unnecessary platform_set_drvdata() 2022-09-22 19:30:35 -07: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: introduce dsa_port_get_master() 2022-09-20 10:32: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: Fix possible memory leaks in dsa_loop_init() 2022-10-28 10:32:59 +01:00
dsa_loop.h
dsa_loop_bdinfo.c
Kconfig net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
lan9303-core.c dsa: lan9303: Add flow ctrl in link_up 2023-01-20 08:53:13 +00:00
lan9303.h
lan9303_i2c.c net: dsa: lan9303: drop of_match_ptr for ID table 2023-03-15 08:11:01 +00:00
lan9303_mdio.c net: dsa: lan9303: drop of_match_ptr for ID table 2023-03-15 08:11:01 +00:00
lantiq_gswip.c net: dsa: lantiq_gswip: mark OF related data as maybe unused 2023-03-15 08:11:01 +00:00
lantiq_pce.h
Makefile net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530-mdio.c net: dsa: mt7530: fix support for MT7531BE 2023-04-19 17:37:45 -07:00
mt7530-mmio.c net: dsa: mt7530: introduce driver for MT7988 built-in switch 2023-04-03 10:13:01 +01:00
mt7530.c net: dsa: mt7530: fix network connectivity with multiple CPU ports 2023-05-05 09:22:04 +01:00
mt7530.h net: dsa: mt7530: fix support for MT7531BE 2023-04-19 17:37:45 -07:00
mv88e6060.c net: dsa: mv88e6060: remove unnecessary dev_set_drvdata() 2022-09-22 19:30:37 -07:00
mv88e6060.h
rzn1_a5psw.c net: Remove C45 check in C22 only MDIO bus drivers 2023-01-20 18:12:45 -08:00
rzn1_a5psw.h net: dsa: rzn1-a5psw: add FDB support 2022-06-27 11:37:55 +01:00
vitesse-vsc73xx-core.c
vitesse-vsc73xx-platform.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx-spi.c net: dsa: vitesse-vsc73xx: remove unnecessary set_drvdata() 2022-09-22 19:30:39 -07:00
vitesse-vsc73xx.h