| From e12655dbdab9e59b74b84b7461ac2f970432c0e3 Mon Sep 17 00:00:00 2001 |
| From: Florian Fainelli <f.fainelli@gmail.com> |
| Date: Thu, 6 Feb 2020 11:07:45 -0800 |
| Subject: [PATCH] net: dsa: b53: Always use dev->vlan_enabled in |
| b53_configure_vlan() |
| |
| commit df373702bc0f8f2d83980ea441e71639fc1efcf8 upstream. |
| |
| 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") |
| Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c |
| index 3f728d609400..131791ce5058 100644 |
| --- a/drivers/net/dsa/b53/b53_common.c |
| +++ b/drivers/net/dsa/b53/b53_common.c |
| @@ -664,7 +664,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, |
| -- |
| 2.7.4 |
| |