]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: Have netpoll bring-up DSA management interface
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 17 Nov 2020 03:52:34 +0000 (19:52 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:27:17 +0000 (13:27 +0100)
commit24184dfd51c9fbe0e478570f4cb3c3fbc8d1b594
treeba6960ce3c03b603d948d1dac0e0f159a6b53c6a
parent16e056beca596f6e03c2597914786f2b1c202f86
net: Have netpoll bring-up DSA management interface

[ Upstream commit 1532b9778478577152201adbafa7738b1e844868 ]

DSA network devices rely on having their DSA management interface up and
running otherwise their ndo_open() will return -ENETDOWN. Without doing
this it would not be possible to use DSA devices as netconsole when
configured on the command line. These devices also do not utilize the
upper/lower linking so the check about the netpoll device having upper
is not going to be a problem.

The solution adopted here is identical to the one done for
net/ipv4/ipconfig.c with 728c02089a0e ("net: ipv4: handle DSA enabled
master network devices"), with the network namespace scope being
restricted to that of the process configuring netpoll.

Fixes: 04ff53f96a93 ("net: dsa: Add netconsole support")
Tested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20201117035236.22658-1-f.fainelli@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/netpoll.c