phy_stop_machine(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– phy_stop_machine(9) πŸ’–

okay so you're in the Kernel API Manual bestie, and we're about to talk about phy_stop_machine β€” say hi πŸ‘‹


✨ NAME ✨

phy_stop_machine β€” stop the PHY state machine tracking πŸ›‘

🌸 SYNOPSIS 🌸

void phy_stop_machine (struct phy_device *phydev );

like, that's the whole vibe. void return, one arg, no drama πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • phydev β€” the target struct phy_device struct 🫢 that's the one you're aiming this at, bestie

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it actually do? It stops the state machine delayed workqueue. Yep β€” the workqueue gets shut down, that's the whole point of the function. πŸ›‘

Then it sets the state to UP β€” but only unless it wasn't up yet. Like, if it was already up, cool, nothing changes; if it wasn't, it becomes UP. Either way you end up at UP, iykyk πŸ’…

⚠️ listen to me VERY carefully: this function must be called BEFORE phy_detach. Not after. Not "eh, close enough". BEFORE. no cap, this is the rule πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/net/phy/phy.c β€” and honestly the whole friend group showed up for this one, so here's the full squad 🫢:


and that's the page, bestie 🧚 source vibes come straight from ./drivers/net/phy, stamped October 2026, all for phy_stop_machine(9) β€” go forth and stop that machine at the RIGHT time πŸ‘‘βœ¨

πŸ“¦ where this page comes from