Skip to content

net: phy: make PHY_HALTED a transition state to PHY_READY

Heiner Kallweit netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: phy: make PHY_HALTED a transition state to PHY_READYdrivers/net/phy/phy.c include/linux/phy.h+25 -322 replies
2/2net: phy: remove states PHY_CHANGELINK and PHY_RESUMINGdrivers/net/phy/phy.c include/linux/phy.h+0 -160 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] net: phy: make PHY_HALTED a transition state to PHY_READY

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(-)
Signature · 1 line
2.20.1