mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-30 18:47:06 +00:00
c9dc0e1bdf
Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From 0068a89747e7c1d9a0bbb7282a34382a4274638a 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: [PATCH] sfp: provide netdev sfp_bus and use for start/stop
|
|
|
|
Add a netdev sfp_bus pointer for propagating the phylink start/stop
|
|
actions to the SFP cage: the SFP cage may not be directly connected to
|
|
phylink, but may be the other side of a fixed PHY, and SFP needs to
|
|
know when the netdev is brought up or taken down.
|
|
|
|
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
|
|
@@ -949,8 +949,8 @@ void phylink_start(struct phylink *pl)
|
|
|
|
if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio))
|
|
mod_timer(&pl->link_poll, jiffies + HZ);
|
|
- 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);
|
|
}
|
|
@@ -971,8 +971,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);
|
|
if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio))
|
|
del_timer_sync(&pl->link_poll);
|
|
|