diff options
author | David S. Miller <davem@davemloft.net> | 2017-12-16 22:11:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-16 22:11:55 -0500 |
commit | c30abd5e40dd863f88e26be09b6ce949145a630a (patch) | |
tree | 5b25362084308502a336d8da26b8dc7430d7c812 /drivers/net/phy/phy.c | |
parent | 28dc4c8f4557d82e9be020e85e2362239270e704 (diff) | |
parent | f3b5ad89de16f5d42e8ad36fbdf85f705c1ae051 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three sets of overlapping changes, two in the packet scheduler
and one in the meson-gxl PHY driver.
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 | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 944143b521d7..0c165ad1d788 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -806,7 +806,6 @@ EXPORT_SYMBOL(phy_stop); */ void phy_start(struct phy_device *phydev) { - bool do_resume = false; int err = 0; mutex_lock(&phydev->lock); @@ -819,6 +818,9 @@ void phy_start(struct phy_device *phydev) phydev->state = PHY_UP; break; case PHY_HALTED: + /* if phy was suspended, bring the physical link up again */ + phy_resume(phydev); + /* make sure interrupts are re-enabled for the PHY */ if (phydev->irq != PHY_POLL) { err = phy_enable_interrupts(phydev); @@ -827,17 +829,12 @@ void phy_start(struct phy_device *phydev) } phydev->state = PHY_RESUMING; - do_resume = true; break; default: break; } mutex_unlock(&phydev->lock); - /* if phy was suspended, bring the physical link up again */ - if (do_resume) - phy_resume(phydev); - phy_trigger_machine(phydev, true); } EXPORT_SYMBOL(phy_start); |