mdiobus_modify_changed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mdiobus_modify_changed ✨

okay so bestie, quickest vibe check ever: this is the mdiobus_modify_changed page from the Kernel API Manual, and it's basically the "did anything actually change tho?" helper for tweaking an mdio device register. Read-modify-write but it tells you if it did anything. Obsessed. πŸ’…


πŸŽ€ NAME πŸŽ€

mdiobus_modify_changed β€” a convenience function for modifying a given mdio device register and returning whether it changed. literally its whole personality. no cap. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

int mdiobus_modify_changed (struct mii_bus *bus , int addr , u32 regnum
, u16 mask , u16 set );

five arguments, one very important return value, we love to see it ✨


🌸 ARGUMENTS 🌸

  • bus β€” the mii_bus struct. the main character of this whole operation 🫢
  • addr β€” the phy address. where your fave lives, basically
  • regnum β€” the register number to write. the exact spot we're touching ✨
  • mask β€” the bit mask of bits to clear. bye-bye bits πŸ‘‹
  • set β€” the bit mask of bits to set. hello bits πŸŽ€

🌈 RETURN 🌈

  • 1 β€” the register was modified (slay, something happened πŸ”₯)
  • 0 β€” no change was needed (nothing to do, honestly valid πŸ’€)
  • negative β€” any error condition (not the vibe, but at least it told you 😭)

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/phy/mdio_bus.c and its whole friend group:

all iconic, all worth a read, iykyk πŸ§šπŸ’œ


okay and that's the whole page bestie β€” go forth and check your registers πŸ¦‹πŸ’–

<div align="center">🌸 from <code>./drivers/net/phy</code>, dated <strong>October 2026</strong> β€” mwah, see u in the kernel tree πŸŽ€πŸ’…</div>

πŸ“¦ where this page comes from