mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 13:11:45 +00:00
net: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports
Frames with DSA headers passing to/from the CPU were taking place in the MAC learning on these ports, resulting in incorrect ATU entries. Disable learning on these ports. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5ba3f7d61a
commit
4c7ea3c079
@ -2029,8 +2029,12 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
|
|||||||
* a port bitmap that has only the bit for this port set and
|
* a port bitmap that has only the bit for this port set and
|
||||||
* the other bits clear.
|
* the other bits clear.
|
||||||
*/
|
*/
|
||||||
ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_ASSOC_VECTOR,
|
reg = 1 << port;
|
||||||
1 << port);
|
/* Disable learning for DSA and CPU ports */
|
||||||
|
if (dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port))
|
||||||
|
reg = PORT_ASSOC_VECTOR_LOCKED_PORT;
|
||||||
|
|
||||||
|
ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_ASSOC_VECTOR, reg);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto abort;
|
goto abort;
|
||||||
|
|
||||||
|
@ -159,6 +159,11 @@
|
|||||||
#define PORT_RATE_CONTROL 0x09
|
#define PORT_RATE_CONTROL 0x09
|
||||||
#define PORT_RATE_CONTROL_2 0x0a
|
#define PORT_RATE_CONTROL_2 0x0a
|
||||||
#define PORT_ASSOC_VECTOR 0x0b
|
#define PORT_ASSOC_VECTOR 0x0b
|
||||||
|
#define PORT_ASSOC_VECTOR_HOLD_AT_1 BIT(15)
|
||||||
|
#define PORT_ASSOC_VECTOR_INT_AGE_OUT BIT(14)
|
||||||
|
#define PORT_ASSOC_VECTOR_LOCKED_PORT BIT(13)
|
||||||
|
#define PORT_ASSOC_VECTOR_IGNORE_WRONG BIT(12)
|
||||||
|
#define PORT_ASSOC_VECTOR_REFRESH_LOCKED BIT(11)
|
||||||
#define PORT_ATU_CONTROL 0x0c
|
#define PORT_ATU_CONTROL 0x0c
|
||||||
#define PORT_PRI_OVERRIDE 0x0d
|
#define PORT_PRI_OVERRIDE 0x0d
|
||||||
#define PORT_ETH_TYPE 0x0f
|
#define PORT_ETH_TYPE 0x0f
|
||||||
|
Loading…
Reference in New Issue
Block a user