__mdiobus_c45_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Hiii bestie πŸ’– welcome to the __mdiobus_c45_read(9) page in the Kernel API Manual β€” we're getting into the unlocked MDIO read vibes, and yes, the lock part is lowkey the whole plot. Let's go 🫢


πŸŽ€ NAME πŸŽ€

__mdiobus_c45_read β€” the unlocked version of the mdiobus_c45_read function. Periodt.


✨ SYNOPSIS ✨

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

🌸 ARGUMENTS 🌸

  • bus β€” the mii_bus struct, aka the bus bestie in question πŸ’…
  • addr β€” the phy address
  • devad β€” device address to read
  • regnum β€” register number to read

πŸ’« RETURN πŸ’«

The register value if successful, negative error code on failure. That's it, that's the return situation πŸ”₯


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this reads a MDIO bus register β€” iconic behavior, truly. But listen: the caller must hold the mdio bus lock. This function is the unlocked version, so it is literally trusting you to have handled that already. Do not make it regret trusting you, bestie 😭


⚠️ NOTE ⚠️

MUST NOT be called from interrupt context. Like, genuinely do not do that. This is a hard no, not a soft no πŸ™ˆ

πŸ‘€ SEE ALSO πŸ‘€

The kernel file is right here: ./drivers/net/phy/mdio_bus.c β€” and the whole fam is pulling up too:


Catch you later, bestie 🫢 β€” this page is from source/version ./drivers/net/phy, dated October 2026, under __mdiobus_c45_read(9) in the Kernel API Manual. Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from