c2cf554281df65129d66de1f0838ce41b8ebad4c
[openwrt/staging/dedeckeh.git] / target / linux / mvebu / patches-4.14 / 409-sfp-use-netdev-sfp_bus-for-start-stop.patch
1 From 883dc66755313e133a787eba4dfde313fe33525b Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Fri, 14 Apr 2017 16:41:55 +0100
4 Subject: sfp: use netdev sfp_bus for start/stop
5
6 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
7 ---
8 drivers/net/phy/phylink.c | 8 ++++----
9 1 file changed, 4 insertions(+), 4 deletions(-)
10
11 --- a/drivers/net/phy/phylink.c
12 +++ b/drivers/net/phy/phylink.c
13 @@ -771,8 +771,8 @@ void phylink_start(struct phylink *pl)
14 clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
15 phylink_run_resolve(pl);
16
17 - if (pl->sfp_bus)
18 - sfp_upstream_start(pl->sfp_bus);
19 + if (pl->netdev->sfp_bus)
20 + sfp_upstream_start(pl->netdev->sfp_bus);
21 if (pl->phydev)
22 phy_start(pl->phydev);
23 }
24 @@ -784,8 +784,8 @@ void phylink_stop(struct phylink *pl)
25
26 if (pl->phydev)
27 phy_stop(pl->phydev);
28 - if (pl->sfp_bus)
29 - sfp_upstream_stop(pl->sfp_bus);
30 + if (pl->netdev->sfp_bus)
31 + sfp_upstream_stop(pl->netdev->sfp_bus);
32
33 phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED);
34 }