* [PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable()
@ 2021-03-10 18:52 Florian Fainelli
2021-03-11 16:28 ` Andrew Lunn
2021-03-11 20:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Florian Fainelli @ 2021-03-10 18:52 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
David S. Miller, Jakub Kicinski, open list
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 <f.fainelli@gmail.com>
---
drivers/net/dsa/b53/b53_common.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index a162499bcafc..9bd51c2a51d2 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable()
2021-03-10 18:52 [PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable() Florian Fainelli
@ 2021-03-11 16:28 ` Andrew Lunn
2021-03-11 20:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2021-03-11 16:28 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Vivien Didelot, Vladimir Oltean, David S. Miller,
Jakub Kicinski, open list
On Wed, Mar 10, 2021 at 10:52:26AM -0800, Florian Fainelli 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 <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable()
2021-03-10 18:52 [PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable() Florian Fainelli
2021-03-11 16:28 ` Andrew Lunn
@ 2021-03-11 20:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-11 20:40 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, andrew, vivien.didelot, olteanv, davem, kuba, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
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 <f.fainelli@gmail.com>
>
> [...]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-11 20:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 18:52 [PATCH net-next] net: dsa: b53: Add debug prints in b53_vlan_enable() Florian Fainelli
2021-03-11 16:28 ` Andrew Lunn
2021-03-11 20:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).