net: dsa: mv88e6xxx: unlock DSA and CPU ports
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 14 Apr 2016 18:42:07 +0000 (14:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Apr 2016 23:07:10 +0000 (19:07 -0400)
Locking a port generates an hardware interrupt when a new SA address is
received. This enables CPU directed learning, which is needed for 802.1X
MAC authentication.

To disable automatic learning on a port, the only configuration needed
is to set its Port Association Vector to all zero.

Clear PAV when SA learning should be disabled instead of locking a port.

Fixes: 4c7ea3c0791e ("net: dsa: mv88e6xxx: disable SA learning for DSA and CPU ports")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c

index 50454be86570d61c40863ca8cad899c2034a316b..028ebe2a6053beee3be55b412a5628371949e918 100644 (file)
@@ -2478,7 +2478,7 @@ static int mv88e6xxx_setup_port(struct dsa_switch *ds, int port)
        reg = 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;
+               reg = 0;
 
        ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_ASSOC_VECTOR, reg);
        if (ret)