Skip to content

Commit 85b4394

Browse files
Russell Kingdavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 939eae2 commit 85b4394

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/phy/phylink.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,12 @@ void phylink_start(struct phylink *pl)
751751
phylink_resolve_flow(pl, &pl->link_config);
752752
phylink_mac_config(pl, &pl->link_config);
753753

754+
/* Restart autonegotiation if using 802.3z to ensure that the link
755+
* parameters are properly negotiated. This is necessary for DSA
756+
* switches using 802.3z negotiation to ensure they see our modes.
757+
*/
758+
phylink_mac_an_restart(pl);
759+
754760
clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
755761
phylink_run_resolve(pl);
756762

0 commit comments

Comments
 (0)