WSL2-Linux-Kernel/net/dsa
Florian Fainelli e804441cfe net: dsa: Fix network device registration order
We cannot be registering the network device first, then setting its
carrier off and finally connecting it to a PHY, doing that leaves a
window during which the carrier is at best inconsistent, and at worse
the device is not usable without a down/up sequence since the network
device is visible to user space with possibly no PHY device attached.

Re-order steps so that they make logical sense. This fixes some devices
where the port was not usable after e.g: an unbind then bind of the
driver.

Fixes: 0071f56e46 ("dsa: Register netdev before phy")
Fixes: 91da11f870 ("net: Distributed Switch Architecture protocol support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-28 10:12:53 -07:00
..
Kconfig dsa: add support for Microchip KSZ tail tagging 2017-05-31 20:56:31 -04:00
Makefile dsa: add support for Microchip KSZ tail tagging 2017-05-31 20:56:31 -04:00
dsa.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
dsa2.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
dsa_priv.h net-next: dsa: move struct dsa_device_ops to the global header file 2017-08-09 22:51:47 -07:00
legacy.c net: dsa: Move FDB add/del implementation inside DSA 2017-08-07 14:48:48 -07:00
port.c net: dsa: Move FDB dump implementation inside DSA 2017-08-07 14:48:48 -07:00
slave.c net: dsa: Fix network device registration order 2017-09-28 10:12:53 -07:00
switch.c net: dsa: Remove switchdev dependency from DSA switch notifier chain 2017-08-07 14:48:48 -07:00
tag_brcm.c net: dsa: tag_brcm: Set output queue from skb queue mapping 2017-09-05 11:53:34 -07:00
tag_dsa.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
tag_edsa.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
tag_ksz.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
tag_lan9303.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
tag_mtk.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
tag_qca.c dsa: remove unused net_device arg from handlers 2017-08-21 10:39:11 -07:00
tag_trailer.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00