diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2017-12-01 10:24:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-05 11:16:18 -0500 |
commit | 85b43945cf758704f5d97767ec70a317c6c8d8eb (patch) | |
tree | 26fedad58b0d6025243cd4dd62f692c1c47320ea /drivers | |
parent | 939eae25d9a509bb9a91c9b4a3988a5cc61ddae4 (diff) | |
download | linux-85b43945cf758704f5d97767ec70a317c6c8d8eb.tar.bz2 |
phylink: restart 802.3z negotiation when starting net device
Restart 802.3z negotiation when the net device is brought up to ensure
that the link partner has our current link modes.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phylink.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 560486463930..40563c8d7352 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -751,6 +751,12 @@ void phylink_start(struct phylink *pl) phylink_resolve_flow(pl, &pl->link_config); phylink_mac_config(pl, &pl->link_config); + /* Restart autonegotiation if using 802.3z to ensure that the link + * parameters are properly negotiated. This is necessary for DSA + * switches using 802.3z negotiation to ensure they see our modes. + */ + phylink_mac_an_restart(pl); + clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); phylink_run_resolve(pl); |