netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] net: phy: make PHY_HALTED a transition state to PHY_READY
@ 2018-12-19  6:50 Heiner Kallweit
  2018-12-19  6:53 ` [PATCH net-next 1/2] " Heiner Kallweit
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Heiner Kallweit @ 2018-12-19  6:50 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev@vger.kernel.org

PHY_HALTED and PHY_READY both are non-started states and quite similar.
Major difference is that phy_start() changes from PHY_HALTED to
PHY_RESUMING which doesn't reconfigure aneg (what PHY_UP does).

There's no guarantee that PHY registers are completely untouched when
waking up from power-down, e.g. after system suspend. Therefore it's
safer to reconfigure aneg also when starting from PHY_HALTED. This can
be achieved and state machine made simpler by making PHY_HALTED going
to PHY_READY after having stopped everything. Then the only way up is
over PHY_UP. As part of the change PHY_HALTED is renamed to PHY_HALT to
reflect that it is a transition state.

After this change states PHY_RESUMING and PHY_CHANGELINK can be
removed.

Heiner Kallweit (2):
  net: phy: make PHY_HALTED a transition state to PHY_READY
  net: phy: remove states PHY_CHANGELINK and PHY_RESUMING

 drivers/net/phy/phy.c | 45 ++++++++++++++++---------------------------
 include/linux/phy.h   | 24 ++++++-----------------
 2 files changed, 23 insertions(+), 46 deletions(-)

-- 
2.20.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-21  3:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19  6:50 [PATCH net-next 0/2] net: phy: make PHY_HALTED a transition state to PHY_READY Heiner Kallweit
2018-12-19  6:53 ` [PATCH net-next 1/2] " Heiner Kallweit
2018-12-19 18:32   ` Florian Fainelli
2018-12-19 20:13     ` Heiner Kallweit
2018-12-19  6:55 ` [PATCH net-next 2/2] net: phy: remove states PHY_CHANGELINK and PHY_RESUMING Heiner Kallweit
2018-12-20  0:20 ` [PATCH net-next 0/2] net: phy: make PHY_HALTED a transition state to PHY_READY David Miller
2018-12-21  3:11 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).