]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Sep 2018 04:15:01 +0000 (21:15 -0700)
commit5eb20ebc54da41d97fc0cf47465f14df76b8198e
tree278f23ca831a60e533a761338e8ff7e331a9b015
parentc25b9b0a179574f75789105a2d82a6e3ab903d9d
net: phy: phylink: ensure the carrier is off when starting phylink

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>
drivers/net/phy/phylink.c