]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Nov 2020 19:04:11 +0000 (11:04 -0800)
commite14ecf5c8371f5e3c2a2e82166d1e38a2fd854e1
tree6c168fb5db64a50ddf77f2c156cd3db670481ed1
parent948619aa0a06ce32b90fa4d35a06a45b61cf006e
net: Have netpoll bring-up DSA management interface

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 62fad9b15fea ("net: ipv4: handle DSA enabled
master network devices"), with the network namespace scope being
restricted to that of the process configuring netpoll.

Fixes: 99e053f4414a ("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>
net/core/netpoll.c