Skip to content

RFC net: phy: PHY_HALTED, the return of the state

Florian Fainelli netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: phy: Export phy_stop_machine()drivers/net/phy/phy.c+1 -01 reply
2/4net: smsc911x: Properly manage PHY during suspend/resumedrivers/net/ethernet/smsc/smsc911x.c+7 -01 reply
3/4net: phy: Force PHY_HALTED during phy_disconnect()drivers/net/phy/phy_device.c+5 -00 replies
4/4net: phy: Correctly process PHY_HALTED in phy_stop_machine()drivers/net/phy/phy.c+10 -28 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchGeert Uytterhoeven
1/4R-b
2/4Reviewed-and-tested-by
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC net-next 0/4] net: phy: PHY_HALTED, the return of the state

Hi all,

This patch series tries to address the shortcomings of the previously and then quickly reverted commit 7ad813f208533cebfcc32d3d7474dc1677d1b09a ("net: phy:
Correctly process PHY_HALTED in phy_stop_machine()")

This time, the empire returns and strikes back with a few additional changes:

- catch phy_disconnect() calls without prior phy_stop() and warn when that happens since that means a driver is not behaving properly. This is AFAIR the case in which David Daney ran into

- what David also was running into is that when the PHY state machine was already in PHY_HALTED, its synchronous call in phy_disconnect() would make us re-schedule ourselves at the end. This is unnecessary, and we now take care of that

- finally, Geert experienced bus errors on smsc911x for a number of reasons, but the primary one is that the driver does not do any management of the PHY state machine during suspend/resume. The last patch corrects that, and also suggests that the driver should be fixed to properly support Wake-on-LAN configuration to possibly suspend the PHY.

David, Marc and Geert, I would appreciate if you could give this patch series a spin on your respective HW and confirm that the desired functionality is achieved.

Florian Fainelli (4):
net: phy: Export phy_stop_machine()
net: smsc911x: Properly manage PHY during suspend/resume
net: phy: Force PHY_HALTED during phy_disconnect()
net: phy: Correctly process PHY_HALTED in phy_stop_machine()

 drivers/net/ethernet/smsc/smsc911x.c |  7 +++++++
 drivers/net/phy/phy.c                | 13 +++++++++++--
 drivers/net/phy/phy_device.c         |  5 +++++
 3 files changed, 23 insertions(+), 2 deletions(-)
Signature · 1 line
2.9.3