netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net] net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans
@ 2017-09-25 21:32 Andrew Lunn
  2017-09-25 21:34 ` Vivien Didelot
  2017-09-28 16:45 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Lunn @ 2017-09-25 21:32 UTC (permalink / raw)
  To: David Miller; +Cc: Vivien Didelot, netdev, Andrew Lunn

Ports with the same VLAN must all be in the same bridge. However the
CPU and DSA ports need to be in multiple VLANs spread over multiple
bridges. So exclude them when performing this test.

Fixes: b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index c6678aa9b4ef..674dab71d71c 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1100,6 +1100,10 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
 	};
 	int i, err;
 
+	/* DSA and CPU ports have to be members of multiple vlans */
+	if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
+		return 0;
+
 	if (!vid_begin)
 		return -EOPNOTSUPP;
 
-- 
2.14.1

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

* Re: [patch net] net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans
  2017-09-25 21:32 [patch net] net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans Andrew Lunn
@ 2017-09-25 21:34 ` Vivien Didelot
  2017-09-28 16:45 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Vivien Didelot @ 2017-09-25 21:34 UTC (permalink / raw)
  To: Andrew Lunn, David Miller; +Cc: netdev, Andrew Lunn

Andrew Lunn <andrew@lunn.ch> writes:

> Ports with the same VLAN must all be in the same bridge. However the
> CPU and DSA ports need to be in multiple VLANs spread over multiple
> bridges. So exclude them when performing this test.
>
> Fixes: b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

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

* Re: [patch net] net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans
  2017-09-25 21:32 [patch net] net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans Andrew Lunn
  2017-09-25 21:34 ` Vivien Didelot
@ 2017-09-28 16:45 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-09-28 16:45 UTC (permalink / raw)
  To: andrew; +Cc: vivien.didelot, netdev

From: Andrew Lunn <andrew@lunn.ch>
Date: Mon, 25 Sep 2017 23:32:20 +0200

> Ports with the same VLAN must all be in the same bridge. However the
> CPU and DSA ports need to be in multiple VLANs spread over multiple
> bridges. So exclude them when performing this test.
> 
> Fixes: b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2017-09-28 16:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-25 21:32 [patch net] net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans Andrew Lunn
2017-09-25 21:34 ` Vivien Didelot
2017-09-28 16:45 ` 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).