[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHPKR9LB=mMjs2ZVbnU4VRO=RqYCh-qy+4USqY8HBf0DjGP1TQ@mail.gmail.com>
Date: Mon, 14 Apr 2014 15:59:32 +0530
From: Balakumaran Kannan <kumaran.4353@...il.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Florian Fainelli <f.fainelli@...il.com>
Subject: why phy_state_machine changes phydev->state from PHY_NOLINK to PHY_RUNNING
Hi all,
When phydev->state is PHY_NOLINK, phy_state_machine checks whether the
link becomes ready. And if the link is ready, it changes phydev->state
to PHY_RUNNING.
Without performing auto-negotiation or checking the state of
auto-negotiation, changing phydev->state to PHY_RUNNING is correct?
My understanding is,
1. At boot time, phydev->state comes to PHY_UP
2. phy_state_machine calls phy_start_aneg to start aneg as the state is PHY_UP
3. phy_start_aneg initiates auto-negotiation and changes the state to PHY_AN
4. While state is PHY_AN, phy_state_machine checks whether
auto-negotiatin completed. If completed, it changes the state to
PHY_RUNNING. If in case link is down, it makes the state to PHY_NOLINK
5. When state is PHY_NOLINK, phy_state_machine checks whether link
becomes ready. If link is ready it changes state to PHY_RUNNING
Without checking the state of auto-negotiation, phy_state_machine
changes phydev->state to PHY_RUNNING. Is this correct approach?
But if we consider PHY_RESUMING case, it checks for completion of
auto-negotiation in case AUTONEG_ENABLE is set. If it is completed
only, phydev->state is set to PHY_RUNNING.
Kindly correct me if I'm wrong.
Regards,
K.Balakumaran
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists