diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-28 08:22:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-28 08:22:00 +0100 |
commit | 83b21ed0fc2a7b17c6b9d4f72f664841f797380b (patch) | |
tree | 99272c0f69b8d762bf82400e6bdb84146b5baadb /drivers/net/phy/phy.c | |
parent | sysrq: Remove duplicated sysrq message (diff) | |
parent | Linux 5.0-rc4 (diff) | |
download | linux-83b21ed0fc2a7b17c6b9d4f72f664841f797380b.tar.xz linux-83b21ed0fc2a7b17c6b9d4f72f664841f797380b.zip |
Merge 5.0-rc4 into tty-next
We need the tty and serial fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index d33e7b3caf03..189cd2048c3a 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -543,13 +543,6 @@ int phy_start_aneg(struct phy_device *phydev) mutex_lock(&phydev->lock); - if (!__phy_is_started(phydev)) { - WARN(1, "called from state %s\n", - phy_state_to_str(phydev->state)); - err = -EBUSY; - goto out_unlock; - } - if (AUTONEG_DISABLE == phydev->autoneg) phy_sanitize_settings(phydev); @@ -560,11 +553,13 @@ int phy_start_aneg(struct phy_device *phydev) if (err < 0) goto out_unlock; - if (phydev->autoneg == AUTONEG_ENABLE) { - err = phy_check_link_status(phydev); - } else { - phydev->state = PHY_FORCING; - phydev->link_timeout = PHY_FORCE_TIMEOUT; + if (__phy_is_started(phydev)) { + if (phydev->autoneg == AUTONEG_ENABLE) { + err = phy_check_link_status(phydev); + } else { + phydev->state = PHY_FORCING; + phydev->link_timeout = PHY_FORCE_TIMEOUT; + } } out_unlock: |