mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-02 11:13:02 +09:00
net: phy: phylink: ensure the carrier is off when starting phylink
[ Upstream commit aeeb2e8fde ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4484de1283
commit
4c2f34ab83
@@ -747,6 +747,9 @@ void phylink_start(struct phylink *pl)
|
||||
phylink_an_mode_str(pl->link_an_mode),
|
||||
phy_modes(pl->link_config.interface));
|
||||
|
||||
/* Always set the carrier off */
|
||||
netif_carrier_off(pl->netdev);
|
||||
|
||||
/* Apply the link configuration to the MAC when starting. This allows
|
||||
* a fixed-link to start with the correct parameters, and also
|
||||
* ensures that we set the appropriate advertisment for Serdes links.
|
||||
|
||||
Reference in New Issue
Block a user