phy_modify_mmd_changed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– phy_modify_mmd_changed β€” NAME energy πŸ’–

okay so welcome to the Kernel API Manual, bestie πŸŽ€ and today's main character is phy_modify_mmd_changed β€” literally the function for modifying a register on an MMD. that's it, that's the vibe. ✨


✨ SYNOPSIS ✨

int phy_modify_mmd_changed (struct phy_device *phydev , int devad , u32
regnum , u16 mask , u16 set );

🌸 ARGUMENTS 🌸

  • phydev β€” the phy_device struct, aka the whole reason we're here 🫢
  • devad β€” the MMD containing the register you wanna modify
  • regnum β€” the register number to modify, yeah we're getting specific
  • mask β€” bit mask of bits to clear πŸ”₯
  • set β€” the new value of the bits set in mask that get written to regnum β€” so mask picks the seats, set decides who's sitting in them πŸ’…

⚠️ NOTE ⚠️

MUST NOT be called from interrupt context, bestie 😭 because the bus read/write functions may wait for an interrupt to conclude the operation. like, it'll just be sitting there waiting, and that's not the moment. periodt.

Return values, listen up: it returns a negative errno, or 0 if there was no change, and 1 in case of change. lowkey obsessed with a function that tells you whether it actually did anything 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/net/phy/phy-core.c, plus the whole friend group:


and that's the page, bestie 🧚 source lives at ./drivers/net/phy, dated October 2026 β€” mwah, slay, go modify some registers responsibly πŸ’œπŸ‘‘

πŸ“¦ where this page comes from