mdiobus_read_nested(9)
π mdiobus_read_nested(9) π
okay bestie, so this is mdiobus_read_nested from the Kernel API Manual β it's the nested-flavoured twin of mdiobus_read, and yes it's exactly as niche and exactly as iconic as it sounds π
β¨ NAME β¨
mdiobus_read_nested β literally the Nested version of the mdiobus_read function, no cap π
πΈ SYNOPSIS πΈ
int mdiobus_read_nested (struct mii_bus *bus , int addr , u32 regnum );
π¦ ARGUMENTS π¦
busβ themii_busstruct πaddrβ the phy address πregnumβ register number to read π
β RETURN β
It gives you the register value if it worked, and a negative error code if it didn't π β that's the whole vibe check.
π DESCRIPTION π
So like, in case of nested MDIO bus access, you avoid lockdep false positives by using mutex_lock_nested. that's it, that's the tea π΅ the way this function exists purely to keep lockdep from panicking over nothing?? obsessed π«Ά
π NOTE π
π¨ MUST NOT be called from interrupt context, because the bus read/write functions may wait for an interrupt to conclude the operation. like fr fr, do NOT do it, it will not slay π
π SEE ALSO π
Kernel file ./drivers/net/phy/mdio_bus.c β and the whole friend group:
__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(9)mdiobus_c45_read(9)mdiobus_c45_read_nested(9)mdiobus_write_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 whole page, bestie!! sourced straight from ./drivers/net/phy, dated October 2026 β mwah, go read some registers responsibly πβ¨π
π¦ 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