diff options
author | David S. Miller <davem@davemloft.net> | 2019-01-18 14:12:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-18 14:12:25 -0800 |
commit | 209f94e6185465a18328f07dc332ea7cee0b72fc (patch) | |
tree | 36132c101bee7156226713c6038de55babc073ea /drivers/net/phy/phy.c | |
parent | 340a6f3d2d52a1b72f3454818e53293807f8f127 (diff) | |
parent | bb658ab7b8f2828b35c207a95cb0c05965721022 (diff) |
Merge branch 'phy-improve-stopping-PHY'
Heiner Kallweit says:
====================
net: phy: improve stopping PHY
This patchset improves and simplifies stopping the PHY.
Heiner Kallweit (3):
net: phy: stop PHY if needed when entering phy_disconnect
net: phy: ensure phylib state machine is stopped after calling phy_stop
net: phy: remove phy_stop_interrupts
v2:
- break down the patch to a patchset
v3:
- don't warn if driver didn't call phy_stop before phy_disconnect
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index b0632e859564..f7a92e7edff7 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -819,23 +819,6 @@ int phy_start_interrupts(struct phy_device *phydev) EXPORT_SYMBOL(phy_start_interrupts); /** - * phy_stop_interrupts - disable interrupts from a PHY device - * @phydev: target phy_device struct - */ -int phy_stop_interrupts(struct phy_device *phydev) -{ - int err = phy_disable_interrupts(phydev); - - if (err) - phy_error(phydev); - - free_irq(phydev->irq, phydev); - - return err; -} -EXPORT_SYMBOL(phy_stop_interrupts); - -/** * phy_stop - Bring down the PHY link, and stop checking the status * @phydev: target phy_device struct */ @@ -858,6 +841,7 @@ void phy_stop(struct phy_device *phydev) mutex_unlock(&phydev->lock); phy_state_machine(&phydev->state_queue.work); + phy_stop_machine(phydev); /* Cannot call flush_scheduled_work() here as desired because * of rtnl_lock(), but PHY_HALTED shall guarantee irq handler |