diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2020-12-15 10:48:07 +0100 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2020-12-15 10:48:07 +0100 | 
| commit | 3c41e57a1e168d879e923c5583adeae47eec9f64 (patch) | |
| tree | e6272012c4b766189be2821316a3d23d115f5195 /net/core/netpoll.c | |
| parent | d14ce74f1fb376ccbbc0b05ded477ada51253729 (diff) | |
| parent | 2f5fbc4305d07725bfebaedb09e57271315691ef (diff) | |
Merge tag 'irqchip-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates for 5.11 from Marc Zyngier:
  - Preliminary support for managed interrupts on platform devices
  - Correctly identify allocation of MSIs proxyied by another device
  - Remove the fasteoi IPI flow which has been proved useless
  - Generalise the Ocelot support to new SoCs
  - Improve GICv4.1 vcpu entry, matching the corresponding KVM optimisation
  - Work around spurious interrupts on Qualcomm PDC
  - Random fixes and cleanups
Link: https://lore.kernel.org/r/20201212135626.1479884-1-maz@kernel.org
Diffstat (limited to 'net/core/netpoll.c')
| -rw-r--r-- | net/core/netpoll.c | 22 | 
1 files changed, 18 insertions, 4 deletions
| diff --git a/net/core/netpoll.c b/net/core/netpoll.c index c310c7c1cef7..960948290001 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -29,6 +29,7 @@  #include <linux/slab.h>  #include <linux/export.h>  #include <linux/if_vlan.h> +#include <net/dsa.h>  #include <net/tcp.h>  #include <net/udp.h>  #include <net/addrconf.h> @@ -657,15 +658,15 @@ EXPORT_SYMBOL_GPL(__netpoll_setup);  int netpoll_setup(struct netpoll *np)  { -	struct net_device *ndev = NULL; +	struct net_device *ndev = NULL, *dev = NULL; +	struct net *net = current->nsproxy->net_ns;  	struct in_device *in_dev;  	int err;  	rtnl_lock(); -	if (np->dev_name[0]) { -		struct net *net = current->nsproxy->net_ns; +	if (np->dev_name[0])  		ndev = __dev_get_by_name(net, np->dev_name); -	} +  	if (!ndev) {  		np_err(np, "%s doesn't exist, aborting\n", np->dev_name);  		err = -ENODEV; @@ -673,6 +674,19 @@ int netpoll_setup(struct netpoll *np)  	}  	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)) {  		np_err(np, "%s is a slave device, aborting\n", np->dev_name);  		err = -EBUSY; | 
