void phylink_stop(struct phylink *pl) { WARN_ON(!lockdep_rtnl_is_held()); if (pl->phydev) phy_stop(pl->phydev); if (pl->sfp_bus) sfp_upstream_stop(pl->sfp_bus); set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); flush_work(&pl->resolve); }
/** * phylink_stop() - stop a phylink instance * @pl: a pointer to a &struct phylink returned from phylink_create() * * Stop the phylink instance specified by @pl. This should be called from the * network device driver's &struct net_device_ops ndo_stop() method. The * network device's carrier state should not be changed prior to calling this * function. */ void phylink_stop(struct phylink *pl) { ASSERT_RTNL(); if (pl->phydev) phy_stop(pl->phydev); if (pl->sfp_bus) sfp_upstream_stop(pl->sfp_bus); if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio)) del_timer_sync(&pl->link_poll); phylink_run_resolve_and_disable(pl, PHYLINK_DISABLE_STOPPED); }
/** * phylink_stop() - stop a phylink instance * @pl: a pointer to a &struct phylink returned from phylink_create() * * Stop the phylink instance specified by @pl. This should be called from the * network device driver's &struct net_device_ops ndo_stop() method. The * network device's carrier state should not be changed prior to calling this * function. */ void phylink_stop(struct phylink *pl) { ASSERT_RTNL(); if (pl->phydev) phy_stop(pl->phydev); if (pl->sfp_bus) sfp_upstream_stop(pl->sfp_bus); if (pl->link_an_mode == MLO_AN_FIXED && !IS_ERR(pl->link_gpio)) del_timer_sync(&pl->link_poll); set_bit(PHYLINK_DISABLE_STOPPED, &pl->phylink_disable_state); queue_work(system_power_efficient_wq, &pl->resolve); flush_work(&pl->resolve); }