diff options
author | David S. Miller <davem@davemloft.net> | 2019-01-21 17:41:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-21 17:41:32 -0500 |
commit | fa7f3a8d56b38a3ed1880a3780afba82387da277 (patch) | |
tree | a4628ee966f21963e5e97a6d1a227a3e8138183e /drivers/net/phy/phy.c | |
parent | 28f9d1a3d4fecdb2352d3984ddeec88146385885 (diff) | |
parent | 49a57857aeea06ca831043acbb0fa5e0f50602fd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Completely minor snmp doc conflict.
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 | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index f7a92e7edff7..745a705a505a 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -538,13 +538,6 @@ int phy_start_aneg(struct phy_device *phydev) | |||
538 | 538 | ||
539 | mutex_lock(&phydev->lock); | 539 | mutex_lock(&phydev->lock); |
540 | 540 | ||
541 | if (!__phy_is_started(phydev)) { | ||
542 | WARN(1, "called from state %s\n", | ||
543 | phy_state_to_str(phydev->state)); | ||
544 | err = -EBUSY; | ||
545 | goto out_unlock; | ||
546 | } | ||
547 | |||
548 | if (AUTONEG_DISABLE == phydev->autoneg) | 541 | if (AUTONEG_DISABLE == phydev->autoneg) |
549 | phy_sanitize_settings(phydev); | 542 | phy_sanitize_settings(phydev); |
550 | 543 | ||
@@ -555,11 +548,13 @@ int phy_start_aneg(struct phy_device *phydev) | |||
555 | if (err < 0) | 548 | if (err < 0) |
556 | goto out_unlock; | 549 | goto out_unlock; |
557 | 550 | ||
558 | if (phydev->autoneg == AUTONEG_ENABLE) { | 551 | if (__phy_is_started(phydev)) { |
559 | err = phy_check_link_status(phydev); | 552 | if (phydev->autoneg == AUTONEG_ENABLE) { |
560 | } else { | 553 | err = phy_check_link_status(phydev); |
561 | phydev->state = PHY_FORCING; | 554 | } else { |
562 | phydev->link_timeout = PHY_FORCE_TIMEOUT; | 555 | phydev->state = PHY_FORCING; |
556 | phydev->link_timeout = PHY_FORCE_TIMEOUT; | ||
557 | } | ||
563 | } | 558 | } |
564 | 559 | ||
565 | out_unlock: | 560 | out_unlock: |