From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King Subject: [PATCH 06/11] phylink: restart 802.3z negotiation when starting net device Date: Fri, 01 Dec 2017 10:24:42 +0000 Message-ID: References: <20171201102306.GA18792@n2100.armlinux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Cc: linux-doc@vger.kernel.org, netdev@vger.kernel.org To: Andrew Lunn , Florian Fainelli , Jonathan Corbet Return-path: Received: from pandora.armlinux.org.uk ([78.32.30.218]:43422 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751632AbdLAKYt (ORCPT ); Fri, 1 Dec 2017 05:24:49 -0500 In-Reply-To: <20171201102306.GA18792@n2100.armlinux.org.uk> Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: 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 --- drivers/net/phy/phylink.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.7.4