summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-04-14 16:41:55 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2019-07-09 11:44:26 +0100
commit39b2a9af64e44208d59442e07b79468b7727e602 (patch)
treec402b775a9f95bd68560f5de23cd50d3929aba15
parent80f2ac44dc4d0bca00146f6ff14570012a38653d (diff)
net: sfp: use netdev sfp_bus and use for start/stop
Use the 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, but SFP still needs to know when the netdev is brought up or taken down. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/phy/phylink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index f51febdb1dc6..36da156fef57 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -936,8 +936,8 @@ void phylink_start(struct phylink *pl)
}
if (pl->link_an_mode == MLO_AN_FIXED && pl->get_fixed_state)
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);
}
@@ -958,8 +958,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);
del_timer_sync(&pl->link_poll);
if (pl->link_irq) {
free_irq(pl->link_irq, pl);