mdiobus_write_nested(9)
β¨ mdiobus_write_nested(9) β¨
okay so bestie, welcome to the Kernel API Manual π and today's main character is mdiobus_write_nested β literally the nested version of the mdiobus_write function, no cap π«Ά
πΈ NAME πΈ
mdiobus_write_nested β it's giving "nested version of the mdiobus_write function" β¨
π¦ SYNOPSIS π¦
int mdiobus_write_nested (struct mii_bus *bus , int addr , u32 regnum ,
u16 val );
like, that's the whole signature, slay π
π ARGUMENTS π
busβ themii_busstruct, your bus babe, the whole vibe πaddrβ the phy address, iykyk πregnumβ register number to write, like the exact drawer you're putting stuff in πvalβ value to write toregnum, the actual thing going in π₯
β RETURN β
Zero if successful π negative error code on failure π
like, zero = ate, negative = it's giving disaster fr fr π
π DESCRIPTION π
In case of nested MDIO bus access, avoid lockdep false positives by using mutex_lock_nested. β¨
lowkey iconic that this is the entire reason this function exists β it's just out here protecting you from fake lockdep drama π§ no cap π
π©· NOTE π©·
MUST NOT be called from interrupt context, because the bus read/write functions may wait for an interrupt to conclude the operation. π¨
like seriously bestie, do NOT do this from interrupt context β highkey it will not end well for you ππ
π SEE ALSO π
Kernel file ./drivers/net/phy/mdio_bus.c plus the whole squad, and yes I'm listing every single one because we don't skip anyone in this house π«Ά:
__mdiobus_read(9)__mdiobus_write(9)__mdiobus_modify_changed(9)__mdiobus_c45_read(9)__mdiobus_c45_write(9)__mdiobus_c45_modify_changed(9)mdiobus_read_nested(9)mdiobus_read(9)mdiobus_c45_read(9)mdiobus_c45_read_nested(9)mdiobus_write(9)mdiobus_c45_write(9)mdiobus_c45_write_nested(9)mdiobus_modify(9)mdiobus_c45_modify(9)mdiobus_modify_changed(9)mdiobus_c45_modify_changed(9)
and that's the page!! π sign-off time: this little baddie lives in ./drivers/net/phy, the version stamp says October 2026, and the manual name is mdiobus_write_nested(9) β go forth and write your registers responsibly bestie, mwah ππβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms