From: Barry Grussling <barry@grussling.com>
To: netdev@vger.kernel.org
Cc: buytenh@wantstofly.org, Barry Grussling <barry@grussling.com>
Subject: [PATCH V3 1/1] DSA: Enable cascading in multi-chip 6131 configuration
Date: Fri, 24 Jun 2011 22:53:51 -0700 [thread overview]
Message-ID: <1308981231-2561-1-git-send-email-barry@grussling.com> (raw)
From: Barry Grussling <barry@grussling.com>
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>
---
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 45f7411..9bd1061 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
--
1.7.4.1
next reply other threads:[~2011-06-25 5:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-25 5:53 Barry Grussling [this message]
2011-06-29 12:54 ` [PATCH V3 1/1] DSA: Enable cascading in multi-chip 6131 configuration David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1308981231-2561-1-git-send-email-barry@grussling.com \
--to=barry@grussling.com \
--cc=buytenh@wantstofly.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).