]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/net-phylink-set-the-autoneg-state-in-phylink_phy_cha.patch
fix up the 5.1 queue :(
[thirdparty/kernel/stable-queue.git] / queue-4.19 / net-phylink-set-the-autoneg-state-in-phylink_phy_cha.patch
1 From 85735f3acb2fd44e0b490996bbf26c6a23474a73 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Thu, 13 Jun 2019 09:37:51 +0300
4 Subject: net: phylink: set the autoneg state in phylink_phy_change
5
6 [ Upstream commit ef7bfa84725d891bbdb88707ed55b2cbf94942bb ]
7
8 The phy_state field of phylink should carry only valid information
9 especially when this can be passed to the .mac_config callback.
10 Update the an_enabled field with the autoneg state in the
11 phylink_phy_change function.
12
13 Fixes: 9525ae83959b ("phylink: add phylink infrastructure")
14 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
15 Signed-off-by: David S. Miller <davem@davemloft.net>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 drivers/net/phy/phylink.c | 1 +
19 1 file changed, 1 insertion(+)
20
21 diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
22 index f6e70f2dfd12..c5a509129ae6 100644
23 --- a/drivers/net/phy/phylink.c
24 +++ b/drivers/net/phy/phylink.c
25 @@ -662,6 +662,7 @@ static void phylink_phy_change(struct phy_device *phydev, bool up,
26 pl->phy_state.pause |= MLO_PAUSE_ASYM;
27 pl->phy_state.interface = phydev->interface;
28 pl->phy_state.link = up;
29 + pl->phy_state.an_enabled = phydev->autoneg;
30 mutex_unlock(&pl->state_mutex);
31
32 phylink_run_resolve(pl);
33 --
34 2.20.1
35