Skip to content

Commit

Permalink
DSA: Enable cascading in multi-chip 6131 configuration
Browse files Browse the repository at this point in the history
This patch enables the 6131 family of chips to forward DSA
packets to other switch chips.  This is needed if multiple
DSA chips are used in a device.  Without this patch the
chip will drop any DSA packets not destined for it.

This patch only enables the forwarding of DSA packets if
multiple chips are used in the switch configuration.

Signed-off-by: Barry Grussling <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
smartiq authored and davem330 committed Jun 29, 2011
1 parent 864834f commit 81399ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions net/dsa/mv88e6131.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,14 @@ static int mv88e6131_setup_global(struct dsa_switch *ds)
REG_WRITE(REG_GLOBAL, 0x1a, (dsa_upstream_port(ds) * 0x1100) | 0x00f0);

/*
* Disable cascade port functionality, and set the switch's
* Disable cascade port functionality unless this device
* is used in a cascade configuration, and set the switch's
* DSA device number.
*/
REG_WRITE(REG_GLOBAL, 0x1c, 0xe000 | (ds->index & 0x1f));
if (ds->dst->pd->nr_chips > 1)
REG_WRITE(REG_GLOBAL, 0x1c, 0xf000 | (ds->index & 0x1f));
else
REG_WRITE(REG_GLOBAL, 0x1c, 0xe000 | (ds->index & 0x1f));

/*
* Send all frames with destination addresses matching
Expand Down

0 comments on commit 81399ec

Please sign in to comment.