summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-12-27 09:02:02 +0100
committerTakashi Iwai <tiwai@suse.de>2017-12-27 09:02:02 +0100
commit7ad3423ebb02f340671f70a916bdc8dbec7573ee (patch)
treeb9168d363c24f2af2626e63011ec1f6c81e81d09 /drivers/net/phy/phy.c
parent56a23ee52611ca76421f3d7cac100e1616716dae (diff)
parent44be77c590f381bc629815ac789b8b15ecc4ddcf (diff)
downloadtalos-op-linux-7ad3423ebb02f340671f70a916bdc8dbec7573ee.tar.gz
talos-op-linux-7ad3423ebb02f340671f70a916bdc8dbec7573ee.zip
Merge branch 'for-linus' into for-next
Back-merge the upstream branch for applying further cleanup patches for HD-Audio. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 2b1e67bc1e73..ed10d1fc8f59 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -828,7 +828,6 @@ EXPORT_SYMBOL(phy_stop);
*/
void phy_start(struct phy_device *phydev)
{
- bool do_resume = false;
int err = 0;
mutex_lock(&phydev->lock);
@@ -841,6 +840,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);
@@ -849,17 +851,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);
OpenPOWER on IntegriCloud