netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085
@ 2011-04-26 11:45 Peter Korsgaard
  2011-04-26 14:57 ` Lennert Buytenhek
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2011-04-26 11:45 UTC (permalink / raw)
  To: davem, buytenh, netdev; +Cc: Peter Korsgaard

The 88e6085 has a few differences from the other devices in the port
control registers, causing unknown multicast/broadcast packets to get
dropped when using the standard port setup.

At the same time update kconfig to clarify that the mv88e6085 is now
supported.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 net/dsa/Kconfig     |    4 ++--
 net/dsa/mv88e6131.c |   26 +++++++++++++++++++++-----
 2 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index 87bb5f4..c53ded2 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -41,12 +41,12 @@ config NET_DSA_MV88E6XXX_NEED_PPU
 	default n
 
 config NET_DSA_MV88E6131
-	bool "Marvell 88E6095/6095F/6131 ethernet switch chip support"
+	bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
 	select NET_DSA_MV88E6XXX
 	select NET_DSA_MV88E6XXX_NEED_PPU
 	select NET_DSA_TAG_DSA
 	---help---
-	  This enables support for the Marvell 88E6095/6095F/6131
+	  This enables support for the Marvell 88E6085/6095/6095F/6131
 	  ethernet switch chips.
 
 config NET_DSA_MV88E6123_61_65
diff --git a/net/dsa/mv88e6131.c b/net/dsa/mv88e6131.c
index 3da4188..45f7411 100644
--- a/net/dsa/mv88e6131.c
+++ b/net/dsa/mv88e6131.c
@@ -207,8 +207,15 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
 	 * mode, but do not enable forwarding of unknown unicasts.
 	 */
 	val = 0x0433;
-	if (p == dsa_upstream_port(ds))
+	if (p == dsa_upstream_port(ds)) {
 		val |= 0x0104;
+		/*
+		 * On 6085, unknown multicast forward is controlled
+		 * here rather than in Port Control 2 register.
+		 */
+		if (ps->id == ID_6085)
+			val |= 0x0008;
+	}
 	if (ds->dsa_port_mask & (1 << p))
 		val |= 0x0100;
 	REG_WRITE(addr, 0x04, val);
@@ -251,10 +258,19 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
 	 * If this is the upstream port for this switch, enable
 	 * forwarding of unknown multicast addresses.
 	 */
-	val = 0x0080 | dsa_upstream_port(ds);
-	if (p == dsa_upstream_port(ds))
-		val |= 0x0040;
-	REG_WRITE(addr, 0x08, val);
+	if (ps->id == ID_6085)
+		/*
+		 * on 6085, bits 3:0 are reserved, bit 6 control ARP
+		 * mirroring, and multicast forward is handled in
+		 * Port Control register.
+		 */
+		REG_WRITE(addr, 0x08, 0x0080);
+	else {
+		val = 0x0080 | dsa_upstream_port(ds);
+		if (p == dsa_upstream_port(ds))
+			val |= 0x0040;
+		REG_WRITE(addr, 0x08, val);
+	}
 
 	/*
 	 * Rate Control: disable ingress rate limiting.
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085
  2011-04-26 11:45 [PATCH] dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085 Peter Korsgaard
@ 2011-04-26 14:57 ` Lennert Buytenhek
  2011-04-26 19:08   ` Peter Korsgaard
  2011-04-28 20:36   ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Lennert Buytenhek @ 2011-04-26 14:57 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: davem, netdev

On Tue, Apr 26, 2011 at 01:45:41PM +0200, Peter Korsgaard wrote:

> The 88e6085 has a few differences from the other devices in the port
> control registers, causing unknown multicast/broadcast packets to get
> dropped when using the standard port setup.
> 
> At the same time update kconfig to clarify that the mv88e6085 is now
> supported.
> 
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Assuming that you've tested this.. :)

Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085
  2011-04-26 14:57 ` Lennert Buytenhek
@ 2011-04-26 19:08   ` Peter Korsgaard
  2011-04-28 20:36   ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2011-04-26 19:08 UTC (permalink / raw)
  To: Lennert Buytenhek; +Cc: davem, netdev

>>>>> "Lennert" == Lennert Buytenhek <buytenh@wantstofly.org> writes:

Hi,

 >> The 88e6085 has a few differences from the other devices in the port
 >> control registers, causing unknown multicast/broadcast packets to get
 >> dropped when using the standard port setup.
 >> 
 >> At the same time update kconfig to clarify that the mv88e6085 is now
 >> supported.
 >> 
 >> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

 Lennert> Assuming that you've tested this.. :)

Yes, this time with multicast as well *red ears* ;)

Thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085
  2011-04-26 14:57 ` Lennert Buytenhek
  2011-04-26 19:08   ` Peter Korsgaard
@ 2011-04-28 20:36   ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-04-28 20:36 UTC (permalink / raw)
  To: buytenh; +Cc: jacmet, netdev

From: Lennert Buytenhek <buytenh@wantstofly.org>
Date: Tue, 26 Apr 2011 16:57:40 +0200

> On Tue, Apr 26, 2011 at 01:45:41PM +0200, Peter Korsgaard wrote:
> 
>> The 88e6085 has a few differences from the other devices in the port
>> control registers, causing unknown multicast/broadcast packets to get
>> dropped when using the standard port setup.
>> 
>> At the same time update kconfig to clarify that the mv88e6085 is now
>> supported.
>> 
>> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
> 
> Assuming that you've tested this.. :)
> 
> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>

Applied, thanks everyone.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-28 20:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 11:45 [PATCH] dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085 Peter Korsgaard
2011-04-26 14:57 ` Lennert Buytenhek
2011-04-26 19:08   ` Peter Korsgaard
2011-04-28 20:36   ` David Miller

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).