lkml.org 
[lkml]   [2021]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next v1] net: dsa: fix bridge support for drivers without port_bridge_flags callback
Date
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(-)

diff --git a/net/dsa/port.c b/net/dsa/port.c
index 01e30264b25b..6379d66a6bb3 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -550,7 +550,7 @@ int dsa_port_bridge_flags(const struct dsa_port *dp,
struct dsa_switch *ds = dp->ds;

if (!ds->ops->port_bridge_flags)
- return -EINVAL;
+ return -EOPNOTSUPP;

return ds->ops->port_bridge_flags(ds, dp->index, flags, extack);
}
--
2.29.2
\
 
 \ /
  Last update: 2021-04-21 15:08    [W:0.105 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site