mdiobus_c45_write_nested(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome to the mdiobus_c45_write_nested(9) page from the Kernel API Manual πŸ’… β€” this one is the nested version of the mdiobus_c45_write function. Nested! We love a layered moment. πŸŽ€

✨ SYNOPSIS ✨

int mdiobus_c45_write_nested (struct mii_bus *bus , int addr , int devad , u32 regnum , u16 val );

πŸŽ€ ARGUMENTS πŸŽ€

  • bus β€” the mii_bus struct 🚌
  • addr β€” the phy address πŸ“
  • devad β€” device address to read (that's the man page's wording, bestie β€” keeping it exactly) πŸ‘€
  • regnum β€” register number to write ✍️
  • val β€” value to write to regnum πŸ’Œ

🌈 RETURN 🌈

Zero if successful 😌; negative error code on failure 😭. That's the vibe check, fr fr.

πŸ’– DESCRIPTION πŸ’–

So in case of nested MDIO bus access, this avoids lockdep false positives by using mutex_lock_nested. Lockdep stays unbothered, the nested access stays iconic. Periodt. πŸ¦‹

⚠️ NOTE ⚠️

MUST NOT be called from interrupt context, because the bus read/write functions may wait for an interrupt to conclude the operation. Not me stressing this enough: interrupt context is a no-go, bestie. πŸ’€

πŸ”— SEE ALSO πŸ”—

Kernel file: ./drivers/net/phy/mdio_bus.c


cute sign-off time 🫢 source/version: ./drivers/net/phy; date: October 2026; page: mdiobus_c45_write_nested(9). mwah πŸ’–

πŸ“¦ where this page comes from