treewide: use wpad-basic-wolfssl as default
[openwrt/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0277-net-phylink-call-mac_an_restart-for-SGMII-QSGMII-inb.patch
1 From d526228a8159d136c914c8f71d5944cda2f93d9a Mon Sep 17 00:00:00 2001
2 From: Vladimir Oltean <vladimir.oltean@nxp.com>
3 Date: Thu, 28 Nov 2019 03:21:53 +0200
4 Subject: [PATCH] net: phylink: call mac_an_restart for SGMII/QSGMII inband
5 interfaces too
6
7 It doesn't quite make sense why restarting the AN process should be
8 unique to 802.3z (1000Base-X) modes. It is valid to put an SGMII PCS in
9 in-band AN mode, therefore also make PHYLINK re-trigger an
10 auto-negotiation if needed.
11
12 Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
13 ---
14 drivers/net/phy/phylink.c | 4 +++-
15 1 file changed, 3 insertions(+), 1 deletion(-)
16
17 --- a/drivers/net/phy/phylink.c
18 +++ b/drivers/net/phy/phylink.c
19 @@ -360,7 +360,9 @@ static void phylink_mac_config_up(struct
20 static void phylink_mac_an_restart(struct phylink *pl)
21 {
22 if (pl->link_config.an_enabled &&
23 - phy_interface_mode_is_8023z(pl->link_config.interface))
24 + (phy_interface_mode_is_8023z(pl->link_config.interface) ||
25 + pl->link_config.interface == PHY_INTERFACE_MODE_SGMII ||
26 + pl->link_config.interface == PHY_INTERFACE_MODE_QSGMII))
27 pl->ops->mac_an_restart(pl->config);
28 }
29