net: dsa: mv88e6xxx: fix setup of port control 1
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 20 Apr 2015 21:19:23 +0000 (17:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Apr 2015 02:01:15 +0000 (22:01 -0400)
mv88e6xxx_setup_port_common was writing to PORT_DEFAULT_VLAN (port
offset 0x07) instead of PORT_CONTROL_1 (port offset 0x05).

Fixes: cca8b1337541 ("net: dsa: Use mnemonics rather than register numbers")
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c

index 9f0c2b9d58aed868968045ebdb24603e8b81e01e..48712bd630bbbd57eec8c17c26c80f8a88ad4fdb 100644 (file)
@@ -1251,8 +1251,7 @@ int mv88e6xxx_setup_port_common(struct dsa_switch *ds, int port)
        /* Port Control 1: disable trunking, disable sending
         * learning messages to this port.
         */
-       ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_DEFAULT_VLAN,
-                                  0x0000);
+       ret = _mv88e6xxx_reg_write(ds, REG_PORT(port), PORT_CONTROL_1, 0x0000);
        if (ret)
                goto abort;