Commit ea92000d authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski

Revert "net: Have netpoll bring-up DSA management interface"

This reverts commit 1532b977.

The above commit is good and it works, however it was meant as a bugfix
for stable kernels and now we have more self-contained ways in DSA to
handle the situation where the DSA master must be brought up.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c0a8a9c2
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <net/dsa.h>
#include <net/tcp.h> #include <net/tcp.h>
#include <net/udp.h> #include <net/udp.h>
#include <net/addrconf.h> #include <net/addrconf.h>
...@@ -658,15 +657,15 @@ EXPORT_SYMBOL_GPL(__netpoll_setup); ...@@ -658,15 +657,15 @@ EXPORT_SYMBOL_GPL(__netpoll_setup);
int netpoll_setup(struct netpoll *np) int netpoll_setup(struct netpoll *np)
{ {
struct net_device *ndev = NULL, *dev = NULL; struct net_device *ndev = NULL;
struct net *net = current->nsproxy->net_ns;
struct in_device *in_dev; struct in_device *in_dev;
int err; int err;
rtnl_lock(); rtnl_lock();
if (np->dev_name[0]) if (np->dev_name[0]) {
struct net *net = current->nsproxy->net_ns;
ndev = __dev_get_by_name(net, np->dev_name); ndev = __dev_get_by_name(net, np->dev_name);
}
if (!ndev) { if (!ndev) {
np_err(np, "%s doesn't exist, aborting\n", np->dev_name); np_err(np, "%s doesn't exist, aborting\n", np->dev_name);
err = -ENODEV; err = -ENODEV;
...@@ -674,19 +673,6 @@ int netpoll_setup(struct netpoll *np) ...@@ -674,19 +673,6 @@ int netpoll_setup(struct netpoll *np)
} }
dev_hold(ndev); dev_hold(ndev);
/* bring up DSA management network devices up first */
for_each_netdev(net, dev) {
if (!netdev_uses_dsa(dev))
continue;
err = dev_change_flags(dev, dev->flags | IFF_UP, NULL);
if (err < 0) {
np_err(np, "%s failed to open %s\n",
np->dev_name, dev->name);
goto put;
}
}
if (netdev_master_upper_dev_get(ndev)) { if (netdev_master_upper_dev_get(ndev)) {
np_err(np, "%s is a slave device, aborting\n", np->dev_name); np_err(np, "%s is a slave device, aborting\n", np->dev_name);
err = -EBUSY; err = -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment