net: dsa: b53: Add debug prints in b53_vlan_enable()
PATCH 1/1 net: dsa: b53: Add debug prints in b53_vlan_enable()
Having dynamic debug prints in b53_vlan_enable() has been helpful to uncover a recent but update the function to indicate the port being configured (or -1 for initial setup) and include the global VLAN enabled and VLAN filtering enable status.
--- drivers/net/dsa/b53/b53_common.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/net/dsa/b53/b53_common.c +7 -4
@@ -349,7 +349,7 @@ static void b53_set_forwarding(struct b53_device *dev, int enable)b53_write8 (dev,B53_CTRL_PAGE ,B53_IP_MULTICAST_CTRL , mgmt); } -static void b53_enable_vlan (struct b53_device *dev,bool enable, +static void b53_enable_vlan (struct b53_device *dev,int port,bool enable,bool enable_filtering) {u8 mgmt, vc0, vc1, vc4 =0 , vc5;
@@ -431,6 +431,9 @@ static void b53_enable_vlan(struct b53_device *dev, bool enable,b53_write8 (dev,B53_CTRL_PAGE ,B53_SWITCH_MODE , mgmt); dev->vlan_enabled = enable; + +dev_dbg (dev->dev,"Port %d VLAN enabled: %d, filtering: %d\n" , + port, enable, enable_filtering); }static int b53_set_jumbo (struct b53_device *dev,bool enable,bool allow_10_100)
@@ -743,7 +746,7 @@ int b53_configure_vlan(struct dsa_switch *ds)b53_do_vlan_op (dev,VTA_CMD_CLEAR ); } -b53_enable_vlan (dev, dev->vlan_enabled, ds->vlan_filtering); +b53_enable_vlan (dev,-1 , dev->vlan_enabled, ds->vlan_filtering);b53_for_each_port (dev, i) b53_write16(dev, B53_VLAN_PAGE,
@@ -1429,7 +1432,7 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering, {struct b53_device *dev = ds->priv; -b53_enable_vlan (dev, dev->vlan_enabled, vlan_filtering); +b53_enable_vlan (dev, port, dev->vlan_enabled, vlan_filtering);return 0 ; }
@@ -1454,7 +1457,7 @@ static int b53_vlan_prepare(struct dsa_switch *ds, int port,if (vlan->vid >= dev->num_vlans)return -ERANGE ; -b53_enable_vlan (dev, true, ds->vlan_filtering); +b53_enable_vlan (dev, port, true, ds->vlan_filtering);return 0 ; }
Signature · 1 line
2.25.1
Quoted 6 lines · Florian Fainelli
Having dynamic debug prints in
b53_vlan_enable()has been helpful to uncover a recent but update the function to indicate the port being configured (or -1 for initial setup) and include the global VLAN enabled and VLAN filtering enable status.Signed-off-by Florian Fainelli <[email protected]>
Andrew
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Wed, 10 Mar 2021 10:52:26 -0800 you wrote:
Having dynamic debug prints in
b53_vlan_enable()has been helpful to uncover a recent but update the function to indicate the port being configured (or -1 for initial setup) and include the global VLAN enabled and VLAN filtering enable status.Signed-off-by Florian Fainelli <[email protected]>[...]
Here is the summary with links:
- [net-next] net: dsa: b53: Add debug prints in b53_vlan_enable()
https://git.kernel.org/netdev/net-next/c/ee47ed08d75e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html