mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net: fec: Fixes to suspend / resume with mac_managed_pm
@ 2024-02-29 10:53 John Ernberg
  2024-02-29 10:53 ` [PATCH net v2 1/2] net: fec: Set mac_managed_pm during probe John Ernberg
  2024-02-29 10:53 ` [PATCH net v2 2/2] net: fec: Suspend and resume the PHY John Ernberg
  0 siblings, 2 replies; 5+ messages in thread
From: John Ernberg @ 2024-02-29 10:53 UTC (permalink / raw)
  To: Wei Fang
  Cc: Shenwei Wang, Clark Wang, NXP Linux Team, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Heiner Kallweit,
	netdev, linux-kernel, John Ernberg

Since the introduction of mac_managed_pm in the FEC driver there were some
discrepancies regarding power management of the PHY.

This failed on our board that has a permanently powered Microchip LAN8700R
attached to the FEC. Although the root cause of the failure can be traced
back to f166f890c8f0 ("net: ethernet: fec: Replace interrupt driven MDIO
with polled IO") and probably even before that, we only started noticing
the problem going from 5.10 to 6.1.

Since 557d5dc83f68 ("net: fec: use mac-managed PHY PM") is actually a fix
to most of the power management sequencing problems that came with power
managing the MDIO bus which for the FEC meant adding a race with FEC
resume (and phy_start() if netif was running) and PHY resume.

That it worked before for us was probably just luck...

Thanks to Wei's response to my report at [1] I was able to pick up his
patch and start honing in on the remaining missing details.

[1]: https://lore.kernel.org/netdev/1f45bdbe-eab1-4e59-8f24-add177590d27@actia.se/

v2:
 - Completely different approach that should be much more correct
   (Wei Fang, Jakub Kucinski)
 - Re-target to net tree, because I have fixes tags now

v1: https://lore.kernel.org/netdev/20240212105010.2258421-1-john.ernberg@actia.se/

John Ernberg (1):
  net: fec: Suspend and resume the PHY

Wei Fang (1):
  net: fec: Set mac_managed_pm during probe

 drivers/net/ethernet/freescale/fec_main.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

-- 
2.43.0

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

end of thread, other threads:[~2024-03-01  8:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 10:53 [PATCH net v2 0/2] net: fec: Fixes to suspend / resume with mac_managed_pm John Ernberg
2024-02-29 10:53 ` [PATCH net v2 1/2] net: fec: Set mac_managed_pm during probe John Ernberg
2024-02-29 10:53 ` [PATCH net v2 2/2] net: fec: Suspend and resume the PHY John Ernberg
2024-03-01  1:49   ` Wei Fang
2024-03-01  8:10     ` John Ernberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®