aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-03-26 21:36:30 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-29 16:23:50 -0400
commit366f0a0f98370d435de64978d623e6abf2630b01 (patch)
tree5a562ef9f0e1085785653daae0cb2fd4d3c43517
parentd827e88a3f48606f1fcd0c285613befce375e076 (diff)
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: Andrew Lunn <andrew@lunn.ch> Cc: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/dsa/mv88e6xxx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index 2052e51edd5d..5da50b00fdf6 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -707,11 +707,10 @@ int mv88e6xxx_setup_port_common(struct dsa_switch *ds, int port)
707 707
708 mutex_lock(&ps->smi_mutex); 708 mutex_lock(&ps->smi_mutex);
709 709
710 /* Port Control 1: disable trunking. Also, if this is the 710 /* Port Control 1: disable trunking, disable sending
711 * CPU port, enable learn messages to be sent to this port. 711 * learning messages to this port.
712 */ 712 */
713 ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), 0x05, 713 ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), 0x05, 0x0000);
714 dsa_is_cpu_port(ds, port) ? 0x8000 : 0x0000);
715 if (ret) 714 if (ret)
716 goto abort; 715 goto abort;
717 716