summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorBarry Grussling <barry@grussling.com>2011-06-24 19:53:51 +0000
committerDavid S. Miller <davem@davemloft.net>2011-06-29 05:53:49 -0700
commit81399ec683632b85863b093f4fffe2b4511e49e6 (patch)
tree928c1d0b620fcfb688ceae9a5b8a28dd808c46a0 /net/dsa
parent864834f935b5311004ebbf0c485dbfd10aa9a546 (diff)
downloadlinux-3.10-81399ec683632b85863b093f4fffe2b4511e49e6.tar.gz
linux-3.10-81399ec683632b85863b093f4fffe2b4511e49e6.tar.bz2
linux-3.10-81399ec683632b85863b093f4fffe2b4511e49e6.zip
DSA: Enable cascading in multi-chip 6131 configuration
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 <barry@grussling.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/mv88e6131.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 45f7411e90b..9bd1061fa4e 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -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