phy_save_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 phy_save_page β€” NAME 🌸

phy_save_page πŸ’… β€” bestie, it grabs the bus lock and saves whatever page you're currently on ✨


✨ SYNOPSIS ✨

int phy_save_page (struct phy_device *phydev );

πŸŽ€ ARGUMENTS πŸŽ€

  • phydev β€” a pointer to a struct phy_device 🫢 (yes it's literally just the one argument, she's low maintenance, we love her)

πŸ’– DESCRIPTION πŸ’–

okay so here's the whole vibe πŸ‘‘: phy_save_page takes the MDIO bus lock and then returns the current page number. That's it. That's the whole job. Iconic, honestly.

If something goes sideways, it returns a negative errno instead 😭 β€” so do your vibe check on that return value, ngl.

🚨 real talk, this is the important part: phy_restore_page must always be called after this β€” irrespective of success or failure of this call. Like, no cap, always. Success, failure, whatever β€” you still call phy_restore_page. Don't leave her hanging bestie πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/net/phy/phy-core.c β€” that's where she lives 🏠

and the whole friend group, fr fr 🌈:


πŸ’œ sign-off πŸ’œ

okay that's the page, ily, go call phy_restore_page 🧚✨

this little beauty comes to you from ./drivers/net/phy 🌸 and she's dated October 2026 β€” yes, from the future, main character energy only πŸ‘‘πŸ’…πŸ“

phy_save_page(9)  Β·  Kernel API Manual  Β·  periodt 🫢

πŸ“¦ where this page comes from