From: Russell King <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 06/11] phylink: restart 802.3z negotiation when starting net device
Date: Fri, 01 Dec 2017 10:24:42 +0000 [thread overview]
Message-ID: <E1eKiUs-0004zB-P8@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20171201102306.GA18792@n2100.armlinux.org.uk>
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>
---
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
next prev parent reply other threads:[~2017-12-01 10:24 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 13:58 [PATCH 0/4] SFP/phylink fixes Russell King - ARM Linux
2017-12-01 10:23 ` [PATCH net-next 00/11] SFP/phylink updates Russell King - ARM Linux
2017-12-01 10:24 ` [PATCH 01/11] phy: add phy_interface_mode_is_8023z() helper Russell King
2017-12-01 17:20 ` Florian Fainelli
2017-12-01 10:24 ` [PATCH 02/11] phylink: merge SGMII and 802.3z handling Russell King
2017-12-01 17:21 ` Florian Fainelli
2017-12-01 10:24 ` [PATCH 03/11] phylink: get rid of separate Cisco SGMII and 802.3z modes Russell King
2017-12-01 17:22 ` Florian Fainelli
2017-12-01 10:24 ` [PATCH 04/11] phylink: add support for 2500baseX and 10GbaseKR Russell King
2017-12-01 17:22 ` Florian Fainelli
2017-12-01 10:24 ` [PATCH 05/11] phylink: remove phylink_init_eee() Russell King
2017-12-01 17:23 ` Florian Fainelli
2017-12-01 10:24 ` Russell King [this message]
2017-12-01 17:24 ` [PATCH 06/11] phylink: restart 802.3z negotiation when starting net device Florian Fainelli
2017-12-01 10:24 ` [PATCH 07/11] phylink: add documentation for kernel APIs Russell King
2017-12-01 17:28 ` Florian Fainelli
2017-12-01 10:24 ` [PATCH 08/11] sfp: " Russell King
2017-12-01 17:28 ` Florian Fainelli
2017-12-01 10:24 ` [PATCH 09/11] sfp: fix sparse warning Russell King
2017-12-01 18:17 ` Florian Fainelli
2017-12-01 10:25 ` [PATCH 10/11] sfp: convert to fwnode Russell King
2017-12-01 18:18 ` Florian Fainelli
2017-12-01 10:25 ` [PATCH 11/11] phylink: " Russell King
2017-12-01 18:19 ` Florian Fainelli
2017-12-01 10:29 ` [PATCH net-next 00/11] SFP/phylink updates Russell King - ARM Linux
2017-12-03 14:55 ` David Miller
2017-12-05 16:16 ` David Miller
2017-12-01 20:18 ` [PATCH 0/4] SFP/phylink fixes David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1eKiUs-0004zB-P8@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=corbet@lwn.net \
--cc=f.fainelli@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).