Commit b3b27005 authored by Peter Korsgaard's avatar Peter Korsgaard Committed by David S. Miller

dsa/mv88e6131: fix unknown multicast/broadcast forwarding on mv88e6085

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: default avatarPeter Korsgaard <jacmet@sunsite.dk>
Acked-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68972efa
...@@ -41,12 +41,12 @@ config NET_DSA_MV88E6XXX_NEED_PPU ...@@ -41,12 +41,12 @@ config NET_DSA_MV88E6XXX_NEED_PPU
default n default n
config NET_DSA_MV88E6131 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
select NET_DSA_MV88E6XXX_NEED_PPU select NET_DSA_MV88E6XXX_NEED_PPU
select NET_DSA_TAG_DSA select NET_DSA_TAG_DSA
---help--- ---help---
This enables support for the Marvell 88E6095/6095F/6131 This enables support for the Marvell 88E6085/6095/6095F/6131
ethernet switch chips. ethernet switch chips.
config NET_DSA_MV88E6123_61_65 config NET_DSA_MV88E6123_61_65
......
...@@ -207,8 +207,15 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p) ...@@ -207,8 +207,15 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p)
* mode, but do not enable forwarding of unknown unicasts. * mode, but do not enable forwarding of unknown unicasts.
*/ */
val = 0x0433; val = 0x0433;
if (p == dsa_upstream_port(ds)) if (p == dsa_upstream_port(ds)) {
val |= 0x0104; 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)) if (ds->dsa_port_mask & (1 << p))
val |= 0x0100; val |= 0x0100;
REG_WRITE(addr, 0x04, val); REG_WRITE(addr, 0x04, val);
...@@ -251,10 +258,19 @@ static int mv88e6131_setup_port(struct dsa_switch *ds, int p) ...@@ -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 * If this is the upstream port for this switch, enable
* forwarding of unknown multicast addresses. * forwarding of unknown multicast addresses.
*/ */
val = 0x0080 | dsa_upstream_port(ds); if (ps->id == ID_6085)
if (p == dsa_upstream_port(ds)) /*
val |= 0x0040; * on 6085, bits 3:0 are reserved, bit 6 control ARP
REG_WRITE(addr, 0x08, val); * 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. * Rate Control: disable ingress rate limiting.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment