mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: Do not configure VLAN ID 0
@ 2019-02-28 23:49 Florian Fainelli
  2019-03-01  6:14 ` Heiner Kallweit
  2019-03-01 10:34 ` Michal Vokáč
  0 siblings, 2 replies; 6+ messages in thread
From: Florian Fainelli @ 2019-02-28 23:49 UTC (permalink / raw)
  To: netdev
  Cc: Heiner Kallweit, Florian Fainelli, Andrew Lunn, Vivien Didelot,
	David S. Miller, open list

Because we skip the prepare phase, we would not get a chance to have the
port_vlan_prepare() callback return -EOPNOTSUPP and tell us about that.
This causes problems with mv88e6xxx which specifically checks for VLAN
ID = 0. Turns out we do not actually need to program that VLAN ID since
it should be the default one for switches anyway.

Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
Fixes: 061f6a505ac3 ("net: dsa: Add ndo_vlan_rx_{add, kill}_vid implementation")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 net/dsa/slave.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 1808a2cd6872..ec54d579645a 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -996,6 +996,9 @@ static int dsa_slave_vlan_rx_add_vid(struct net_device *dev, __be16 proto,
 	struct bridge_vlan_info info;
 	int ret;
 
+	if (vid == 0)
+		return 0;
+
 	/* Check for a possible bridge VLAN entry now since there is no
 	 * need to emulate the switchdev prepare + commit phase.
 	 */
@@ -1029,6 +1032,9 @@ static int dsa_slave_vlan_rx_kill_vid(struct net_device *dev, __be16 proto,
 	struct bridge_vlan_info info;
 	int ret;
 
+	if (vid == 0)
+		return 0;
+
 	/* Check for a possible bridge VLAN entry now since there is no
 	 * need to emulate the switchdev prepare + commit phase.
 	 */
-- 
2.17.1


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

end of thread, other threads:[~2019-03-01 20:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-28 23:49 [PATCH net-next] net: dsa: Do not configure VLAN ID 0 Florian Fainelli
2019-03-01  6:14 ` Heiner Kallweit
2019-03-01 10:34 ` Michal Vokáč
2019-03-01 17:52   ` Florian Fainelli
2019-03-01 17:54     ` Florian Fainelli
2019-03-01 20:40       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®