Commit db161d93 authored by David S. Miller's avatar David S. Miller

Merge branch 'phylink-ensure-the-carrier-is-off-when-starting-phylink'

Antoine Tenart says:

====================
net: phy: phylink: ensure the carrier is off when starting phylink

Following the discussion we had regarding the phylink issue related to
the carrier link state not being off when starting phylink, I sent a fix
patch a few days ago for the PPv2 driver:
https://lkml.org/lkml/2018/9/14/633

The idea was to send a patch which could go to the stable branches, but
a better solution would be to directly call netif_carrier_off() from
within phylink_start(). This is the aim of this series.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 02f7f61e 09b8a45e
......@@ -3791,9 +3791,6 @@ static int mvneta_open(struct net_device *dev)
goto err_free_online_hp;
}
/* In default link is down */
netif_carrier_off(pp->dev);
ret = mvneta_mdio_probe(pp);
if (ret < 0) {
netdev_err(dev, "cannot probe MDIO bus\n");
......
......@@ -3193,7 +3193,6 @@ static void mvpp2_start_dev(struct mvpp2_port *port)
mvpp22_mode_reconfigure(port);
if (port->phylink) {
netif_carrier_off(port->dev);
phylink_start(port->phylink);
} else {
/* Phylink isn't used as of now for ACPI, so the MAC has to be
......
......@@ -901,6 +901,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 advertisement for Serdes links.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment