netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Barry Grussling <barry@grussling.com>
To: netdev@vger.kernel.org
Cc: buytenh@wantstofly.org, Barry Grussling <barry@grussling.com>
Subject: [PATCH 1/1] Allow cascading to work with 6131 chip
Date: Mon, 20 Jun 2011 13:40:33 -0700	[thread overview]
Message-ID: <1308602433-31320-2-git-send-email-barry@grussling.com> (raw)
In-Reply-To: <1308602433-31320-1-git-send-email-barry@grussling.com>

---
 net/dsa/mv88e6131.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 45f7411..1a1d1d1 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.0.4


  reply	other threads:[~2011-06-20 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 20:40 [PATCH 0/1] DSA: Enable cascading for multiple 6131 chips Barry Grussling
2011-06-20 20:40 ` Barry Grussling [this message]
2011-06-20 21:18   ` [PATCH 1/1] Allow cascading to work with 6131 chip 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=1308602433-31320-2-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).