mdiobus_c45_modify_changed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– mdiobus_c45_modify_changed(9) πŸ’–

okay so this is a page from the Kernel API Manual, and the main character is mdiobus_c45_modify_changed, bestie. It's the convenience-function friend who modifies a given mdio device register and tells you if it actually changed. No cap, that's the whole vibe. ✨

πŸŽ€ NAME πŸŽ€

mdiobus_c45_modify_changed β€” Convenience function for modifying a given mdio device register and returning if it changed. It's giving β€œpoke the register, then report back” energy, but make it kernel πŸ’…

✨ SYNOPSIS ✨

Here's the signature, copied exactly so nobody comes for me:

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

The return type is int, and the function is mdiobus_c45_modify_changed. That's it, that's the synopsis. πŸ’«

πŸ¦‹ ARGUMENTS πŸ¦‹

  • bus β€” the mii_bus struct. The bus bestie in question 🚌
  • addr β€” the phy address. Yes, lowercase phy, that's literally how the page says it.
  • devad β€” device address to read. The page says read β€” I'm just reporting the facts, bestie πŸ‘€
  • regnum β€” register number to write.
  • mask β€” bit mask of bits to clear.
  • set β€” bit mask of bits to set.

That's the whole cast. Don't get cute and skip one. πŸ’–

🌈 RETURN 🌈

  • 1 if the register was modified.
  • 0 if no change was needed.
  • negative on any error condition.

So 1 means it changed, 0 means no change was needed, and negative means any error condition. periodt. πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/phy/mdio_bus.c is where this lives. The whole friend group, in order:


mwah πŸ’‹ source/version: ./drivers/net/phy; date: October 2026; page: mdiobus_c45_modify_changed(9). Bye bestie, go modify some registers responsibly 🫢✨

πŸ“¦ where this page comes from