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: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Peter Korsgaard and committed by David S. Miller b3b27005 68972efa

+23 -7
+2 -2
net/dsa/Kconfig
··· 41 default n 42 43 config NET_DSA_MV88E6131 44 - bool "Marvell 88E6095/6095F/6131 ethernet switch chip support" 45 select NET_DSA_MV88E6XXX 46 select NET_DSA_MV88E6XXX_NEED_PPU 47 select NET_DSA_TAG_DSA 48 ---help--- 49 - This enables support for the Marvell 88E6095/6095F/6131 50 ethernet switch chips. 51 52 config NET_DSA_MV88E6123_61_65
··· 41 default n 42 43 config NET_DSA_MV88E6131 44 + bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support" 45 select NET_DSA_MV88E6XXX 46 select NET_DSA_MV88E6XXX_NEED_PPU 47 select NET_DSA_TAG_DSA 48 ---help--- 49 + This enables support for the Marvell 88E6085/6095/6095F/6131 50 ethernet switch chips. 51 52 config NET_DSA_MV88E6123_61_65
+21 -5
net/dsa/mv88e6131.c
··· 207 * mode, but do not enable forwarding of unknown unicasts. 208 */ 209 val = 0x0433; 210 - if (p == dsa_upstream_port(ds)) 211 val |= 0x0104; 212 if (ds->dsa_port_mask & (1 << p)) 213 val |= 0x0100; 214 REG_WRITE(addr, 0x04, val); ··· 258 * If this is the upstream port for this switch, enable 259 * forwarding of unknown multicast addresses. 260 */ 261 - val = 0x0080 | dsa_upstream_port(ds); 262 - if (p == dsa_upstream_port(ds)) 263 - val |= 0x0040; 264 - REG_WRITE(addr, 0x08, val); 265 266 /* 267 * Rate Control: disable ingress rate limiting.
··· 207 * mode, but do not enable forwarding of unknown unicasts. 208 */ 209 val = 0x0433; 210 + if (p == dsa_upstream_port(ds)) { 211 val |= 0x0104; 212 + /* 213 + * On 6085, unknown multicast forward is controlled 214 + * here rather than in Port Control 2 register. 215 + */ 216 + if (ps->id == ID_6085) 217 + val |= 0x0008; 218 + } 219 if (ds->dsa_port_mask & (1 << p)) 220 val |= 0x0100; 221 REG_WRITE(addr, 0x04, val); ··· 251 * If this is the upstream port for this switch, enable 252 * forwarding of unknown multicast addresses. 253 */ 254 + if (ps->id == ID_6085) 255 + /* 256 + * on 6085, bits 3:0 are reserved, bit 6 control ARP 257 + * mirroring, and multicast forward is handled in 258 + * Port Control register. 259 + */ 260 + REG_WRITE(addr, 0x08, 0x0080); 261 + else { 262 + val = 0x0080 | dsa_upstream_port(ds); 263 + if (p == dsa_upstream_port(ds)) 264 + val |= 0x0040; 265 + REG_WRITE(addr, 0x08, val); 266 + } 267 268 /* 269 * Rate Control: disable ingress rate limiting.