]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: phy: phylink: ensure the carrier is off when starting phylink
authorAntoine Tenart <antoine.tenart@bootlin.com>
Wed, 19 Sep 2018 09:39:31 +0000 (11:39 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:56:37 +0000 (19:56 -0600)
commitf56e0d7111c82e0346f09ba637d9f87671a27a84
tree922cbd096599acee55d434f77690e523ee378dc0
parente152dc07ee445e6f8ab9bb4b37f13b1b31ea521b
net: phy: phylink: ensure the carrier is off when starting phylink

BugLink: https://bugs.launchpad.net/bugs/1836802
[ Upstream commit aeeb2e8fdefdd5d257a1446351c70cb3df540199 ]

Phylink made an assumption about the carrier state being down when
calling phylink_start(). If this assumption isn't satisfied, the
internal phylink state could misbehave and a net device could end up not
being functional.

This patch fixes this by explicitly calling netif_carrier_off() in
phylink_start().

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/phy/phylink.c