mdiobus_c45_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 mdiobus_c45_read β€” NAME 🌸

Sooo bestie, this is mdiobus_c45_read β€” the convenience function for reading a given MII mgmt register. That's it, that's the whole vibe: it reads a register for you so you don't have to do the grubby low-level dance yourself πŸŽ€

(btw you're in the Kernel API Manual, section 9 β€” welcome, make yourself comfy πŸ’…)


✨ SYNOPSIS ✨

int mdiobus_c45_read (struct mii_bus *bus , int addr , int devad , u32
regnum );

🫢 ARGUMENTS 🫢

  • bus β€” the mii_bus struct. The whole bus situation, the main character of this call.
  • addr β€” the phy address. Which phy we're talking to, no cap.
  • devad β€” device address to read.
  • regnum β€” register number to read.

πŸ’– RETURN πŸ’–

The register value if it all goes well β€” yay ✨ β€” and a negative error code on failure 😭 (so like, check it, fr fr).

πŸ’€ NOTE πŸ’€

MUST NOT be called from interrupt context. Not a suggestion, a MUST NOT, okay?? The reason is because the bus read/write functions may wait for an interrupt to conclude the operation β€” so if you're already in an interrupt, you'd be waiting on yourself and that's giving deadlock energy πŸ™ˆπŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/net/phy/mdio_bus.c plus this whole little family of friends:


okay that's the whole page, you ate it πŸ’…βœ¨

β€” source ./drivers/net/phy, October 2026, straight outta the Kernel API Manual. mwah, go read some registers responsibly πŸŒˆπŸ‘‘πŸ“

πŸ“¦ where this page comes from