aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2018-11-07 20:46:51 +0100
committerDavid S. Miller <davem@davemloft.net>2018-11-08 15:02:06 -0800
commit85a1f31d6392fb2c6726fcc4e072de008e3f0656 (patch)
tree39b511d3c4000f848fde222df1207a877d4c29a0 /drivers/net/phy/phy.c
parentnet: phy: add phy_check_link_status (diff)
downloadlinux-dev-85a1f31d6392fb2c6726fcc4e072de008e3f0656.tar.xz
linux-dev-85a1f31d6392fb2c6726fcc4e072de008e3f0656.zip
net: phy: remove state PHY_AN
After the recent changes in the state machine state PHY_AN isn't used any longer and can be removed. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 87ed000307b7..226824804208 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -50,7 +50,6 @@ static const char *phy_state_to_str(enum phy_state st)
PHY_STATE_STR(READY)
PHY_STATE_STR(PENDING)
PHY_STATE_STR(UP)
- PHY_STATE_STR(AN)
PHY_STATE_STR(RUNNING)
PHY_STATE_STR(NOLINK)
PHY_STATE_STR(FORCING)
@@ -944,32 +943,6 @@ void phy_state_machine(struct work_struct *work)
case PHY_UP:
needs_aneg = true;
- phydev->link_timeout = PHY_AN_TIMEOUT;
-
- break;
- case PHY_AN:
- err = phy_read_status(phydev);
- if (err < 0)
- break;
-
- /* If the link is down, give up on negotiation for now */
- if (!phydev->link) {
- phydev->state = PHY_NOLINK;
- phy_link_down(phydev, true);
- break;
- }
-
- /* Check if negotiation is done. Break if there's an error */
- err = phy_aneg_done(phydev);
- if (err < 0)
- break;
-
- /* If AN is done, we're running */
- if (err > 0) {
- phydev->state = PHY_RUNNING;
- phy_link_up(phydev);
- } else if (0 == phydev->link_timeout--)
- needs_aneg = true;
break;
case PHY_NOLINK:
if (!phy_polling_mode(phydev))