Skip to content

Commit

Permalink
net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan()
Browse files Browse the repository at this point in the history
[ Upstream commit df373702bc0f8f2d83980ea441e71639fc1efcf8 ]

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: 967dd82 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ffainelli authored and gregkh committed Feb 11, 2020
1 parent 62e5f51 commit 25a1729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dsa/b53/b53_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ int b53_configure_vlan(struct dsa_switch *ds)
b53_do_vlan_op(dev, VTA_CMD_CLEAR);
}

b53_enable_vlan(dev, false, dev->vlan_filtering_enabled);
b53_enable_vlan(dev, dev->vlan_enabled, dev->vlan_filtering_enabled);

b53_for_each_port(dev, i)
b53_write16(dev, B53_VLAN_PAGE,
Expand Down

0 comments on commit 25a1729

Please sign in to comment.