Skip to content

net: fec: Fix to suspend / resume with mac_managed_pm

John Ernberg imx lkml netdev 3 versions – Applied

Status from this message: This patch was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 0 repliesApplied 1/1
  2. v32 patches 12 repliesSuperseded
  3. v22 patches 2 repliesSuperseded

Changes in v4 from the cover letter

- Adjustments to commit message in patch 1
- Drop patch 2 after discussion in v3.

Patches in v4 All 1 applied

#Subject and filesSizeRepliesApplied
1/1net: fec: Set mac_managed_pm during probedrivers/net/ethernet/freescale/fec_main.c+9 -20 repliesApplied

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH net v4 0/1] net: fec: Fix to suspend / resume with mac_managed_pm

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/[email protected]/

v4:
- Adjustments to commit message in patch 1
- Drop patch 2 after discussion in v3.

v3: https://lore.kernel.org/netdev/[email protected]/
- Implement feedback from Wei Fang for patch 2
- Fixes tag in patch 2 dropped, should it be delayed for net-next now?

v2: https://lore.kernel.org/netdev/[email protected]/
- Completely different approach that should be much more correct (Wei Fang, Jakub Kicinski)
- Re-target to net tree, because I have fixes tags now

v1: https://lore.kernel.org/netdev/[email protected]/

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

 drivers/net/ethernet/freescale/fec_main.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
Signature · 1 line
2.44.0