__mdiobus_modify_changed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __mdiobus_modify_changed β€” the kernel API manual, but make it make sense

okay so bestie, welcome to the __mdiobus_modify_changed(9) page from the Kernel API Manual β€” yes it's the unlocked version of the mdiobus_modify function, and yes we're gonna walk through it together like it's a group chat. πŸŽ€


✨ NAME ✨

__mdiobus_modify_changed β€” the unlocked version of the mdiobus_modify function, no cap. πŸ’…


🌸 SYNOPSIS 🌸

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

πŸ¦‹ ARGUMENTS πŸ¦‹

  • bus β€” the mii_bus struct, the main character here 🫢
  • addr β€” the phy address. which one? this one ✨
  • regnum β€” register number to modify
  • mask β€” bit mask of bits to clear
  • set β€” bit mask of bits to set

⭐ RETURN ⭐

1 if the register was modified, 0 if no change was needed, negative on any error condition. it's giving simple binary slay πŸ’€βœ¨


πŸ’– DESCRIPTION πŸ’–

Read, modify, and if any change, write the register value back to the device. that's literally it, that's the whole vibe 😭


πŸ’€ NOTE πŸ’€

MUST NOT be called from interrupt context. fr fr, do not do this. not the move. 🚫

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/net/phy/mdio_bus.c β€” plus the whole squad, iykyk:


that's the whole page bestie, go forth and modify some registers (but not from interrupt context, bestie, I'm begging πŸ™ˆ). this came straight out of ./drivers/net/phy, dated October 2026 β€” luv u, bye πŸ’œπŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from