summaryrefslogtreecommitdiff
path: root/drivers/net/phy/phylink.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-09-19 21:15:02 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-19 21:15:02 -0700
commitdb161d930a194b05efa0129978d7ec5d6dea6fb5 (patch)
tree39fd86f720388b7ab75008a19ca0a0e4f008a5c7 /drivers/net/phy/phylink.c
parent02f7f61e5af2fa4748d610b8e4b1af70a44dcbe3 (diff)
parent09b8a45eda546d2d93ee75c9899aba22c4dcb814 (diff)
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phylink.c')
-rw-r--r--drivers/net/phy/phylink.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 3ba5cf2a8a5f..1d01e0c625a5 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -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.