Starting with patch:
a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
drivers without "port_bridge_flags" callback will fail to join the bridge.
Looking at the code, -EOPNOTSUPP seems to be the proper return value,
which makes at least microchip and atheros switches work again.
Fixes: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
net/dsa/port.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Starting with patch:
a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
drivers without "port_bridge_flags" callback will fail to join the bridge.
Looking at the code, -EOPNOTSUPP seems to be the proper return value,
which makes at least microchip and atheros switches work again.
Fixes: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
From: Vladimir Oltean <olteanv@gmail.com> Date: 2021-04-21 16:41:00
On Wed, Apr 21, 2021 at 03:05:40PM +0200, Oleksij Rempel wrote:
quoted hunk
Starting with patch:
a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
drivers without "port_bridge_flags" callback will fail to join the bridge.
Looking at the code, -EOPNOTSUPP seems to be the proper return value,
which makes at least microchip and atheros switches work again.
Fixes: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
net/dsa/port.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -550,7 +550,7 @@ int dsa_port_bridge_flags(const struct dsa_port *dp,structdsa_switch*ds=dp->ds;if(!ds->ops->port_bridge_flags)-return-EINVAL;+return-EOPNOTSUPP;returnds->ops->port_bridge_flags(ds,dp->index,flags,extack);}
--
2.29.2
The Fixes: tag should be:
Fixes: 5961d6a12c13 ("net: dsa: inherit the actual bridge port flags at join time")
What we return to the bridge is -EINVAL, via dsa_port_pre_bridge_flags()
(it is a two-step calling convention thing). But dsa_port_bridge_flags()
should never return that -EINVAL to the bridge, because the bridge
should just stop if the "pre" call returned an error.
So the -EINVAL return value from dsa_port_bridge_flags() is just for
callers who don't bother to call "pre".
To be honest I don't know why I wrote dsa_port_inherit_brport_flags this
way. It might be better to just do:
-----------------------------[cut here]-----------------------------
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 21 Apr 2021 15:05:40 +0200 you wrote:
Starting with patch:
a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags")
drivers without "port_bridge_flags" callback will fail to join the bridge.
Looking at the code, -EOPNOTSUPP seems to be the proper return value,
which makes at least microchip and atheros switches work again.
[...]