Re: [PATCH net 2/2] net: dsa: mt7530: fix network connectivity with multiple CPU ports

From: Florian Fainelli
Date: Tue May 02 2023 - 14:30:47 EST




On 5/1/2023 5:15 AM, arinc9.unal@xxxxxxxxx wrote:
From: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>

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.

Tested-by: Arınç ÜNAL <arinc.unal@xxxxxxxxxx>

This tag is implied by your Signed-off-by tag. No Fixes tag for this one?
--
Florian