Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 366f0a0f authored by Guenter Roeck's avatar Guenter Roeck Committed by David S. Miller
Browse files

net: dsa: mv88e6xxx: Disable Message Port bit for CPU port



Datasheet says that the Message Port bit should not be set for the CPU port.
Having it set causes DSA tagged packets to be sent to the CPU port roughly
every 30 seconds. Those packets are the same as real packets forwarded between
switch ports if the switch is configured for switching between multiple ports.
The packets are then bridged by the software bridge, resulting in duplicated
packets on the network.

Reported-by: default avatarAndrew Lunn <andrew@lunn.ch>
Cc: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d827e88a
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -707,11 +707,10 @@ int mv88e6xxx_setup_port_common(struct dsa_switch *ds, int port)


	mutex_lock(&ps->smi_mutex);
	mutex_lock(&ps->smi_mutex);


	/* Port Control 1: disable trunking.  Also, if this is the
	/* Port Control 1: disable trunking, disable sending
	 * CPU port, enable learn messages to be sent to this port.
	 * learning messages to this port.
	 */
	 */
	ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), 0x05,
	ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), 0x05, 0x0000);
				   dsa_is_cpu_port(ds, port) ? 0x8000 : 0x0000);
	if (ret)
	if (ret)
		goto abort;
		goto abort;