aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/dsa/mv88e6171.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
index 2f6662c246fa..6ce6a3ea1b8d 100644
--- a/drivers/net/dsa/mv88e6171.c
+++ b/drivers/net/dsa/mv88e6171.c
@@ -221,28 +221,6 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
221 val |= 0x000c; 221 val |= 0x000c;
222 REG_WRITE(addr, 0x04, val); 222 REG_WRITE(addr, 0x04, val);
223 223
224 /* Port Control 1: disable trunking. Also, if this is the
225 * CPU port, enable learn messages to be sent to this port.
226 */
227 REG_WRITE(addr, 0x05, dsa_is_cpu_port(ds, p) ? 0x8000 : 0x0000);
228
229 /* Port based VLAN map: give each port its own address
230 * database, allow the CPU port to talk to each of the 'real'
231 * ports, and allow each of the 'real' ports to only talk to
232 * the upstream port.
233 */
234 val = (p & 0xf) << 12;
235 if (dsa_is_cpu_port(ds, p))
236 val |= ds->phys_port_mask;
237 else
238 val |= 1 << dsa_upstream_port(ds);
239 REG_WRITE(addr, 0x06, val);
240
241 /* Default VLAN ID and priority: don't set a default VLAN
242 * ID, and set the default packet priority to zero.
243 */
244 REG_WRITE(addr, 0x07, 0x0000);
245
246 /* Port Control 2: don't force a good FCS, set the maximum 224 /* Port Control 2: don't force a good FCS, set the maximum
247 * frame size to 10240 bytes, don't let the switch add or 225 * frame size to 10240 bytes, don't let the switch add or
248 * strip 802.1q tags, don't discard tagged or untagged frames 226 * strip 802.1q tags, don't discard tagged or untagged frames
@@ -287,7 +265,7 @@ static int mv88e6171_setup_port(struct dsa_switch *ds, int p)
287 */ 265 */
288 REG_WRITE(addr, 0x19, 0x7654); 266 REG_WRITE(addr, 0x19, 0x7654);
289 267
290 return 0; 268 return mv88e6xxx_setup_port_common(ds, p);
291} 269}
292 270
293static int mv88e6171_setup(struct dsa_switch *ds) 271static int mv88e6171_setup(struct dsa_switch *ds)