Skip to contentSkip to conversation

net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan()

PATCH In review Florian Fainelli 2 participants 2 messages Feb 6, 2020 – Feb 7, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan()

b53_configure_vlan() is called by the bcm_sf2 driver upon setup and indirectly through resume as well. During the initial setup, we are guaranteed that dev->vlan_enabled is false, so there is no change in behavior, however during suspend, we may have enabled VLANs before, so we do want to restore that setting.

Fixes dad8d7c6452b ("net: dsa: b53: Properly account for VLAN filtering")
Fixes 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
---
 drivers/net/dsa/b53/b53_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/b53/b53_common.c +1 -1
index 060497512159..449a22172e07 100644
@@ -693,7 +693,7 @@ int b53_configure_vlan(struct dsa_switch *ds)
 		b53_do_vlan_op(dev, VTA_CMD_CLEAR);
 	}
 
-	b53_enable_vlan(dev, false, ds->vlan_filtering);
+	b53_enable_vlan(dev, dev->vlan_enabled, ds->vlan_filtering);
 
 	b53_for_each_port(dev, i)
 		b53_write16(dev, B53_VLAN_PAGE,
Signature · 1 line
2.17.1
maintainer
#1 lore raw

From: Florian Fainelli <[email protected]>
Date: Thu, 6 Feb 2020 11:07:45 -0800

Quoted 9 lines

b53_configure_vlan() is called by the bcm_sf2 driver upon setup and indirectly through resume as well. During the initial setup, we are guaranteed that dev->vlan_enabled is false, so there is no change in behavior, however during suspend, we may have enabled VLANs before, so we do want to restore that setting.

Fixes dad8d7c6452b ("net: dsa: b53: Properly account for VLAN filtering")
Fixes 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")

Applied and queued up for -stable.