aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-4.14/409-sfp-use-netdev-sfp_bus-for-start-stop.patch
blob: 10bd2d0a46cd06648c1ba4b40425343e19a56bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 883dc66755313e133a787eba4dfde313fe33525b Mon Sep 17 00:00:00 2001
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Fri, 14 Apr 2017 16:41:55 +0100
Subject: sfp: use netdev sfp_bus for start/stop

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/phylink.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -777,8 +777,8 @@ void phylink_start(struct phylink *pl)
 	clear_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state);
 	phylink_run_resolve(pl);
 
-	if (pl->sfp_bus)
-		sfp_upstream_start(pl->sfp_bus);
+	if (pl->netdev->sfp_bus)
+		sfp_upstream_start(pl->netdev->sfp_bus);
 	if (pl->phydev)
 		phy_start(pl->phydev);
 }
@@ -790,8 +790,8 @@ void phylink_stop(struct phylink *pl)
 
 	if (pl->phydev)
 		phy_stop(pl->phydev);
-	if (pl->sfp_bus)
-		sfp_upstream_stop(pl->sfp_bus);
+	if (pl->netdev->sfp_bus)
+		sfp_upstream_stop(pl->netdev->sfp_bus);
 
 	phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED);
 }