mdiobus_write(9)
πΈ NAME πΈ
mdiobus_write β bestie, it's literally the convenience function for writing a given MII mgmt register. That's the whole vibe. β¨
This is the mdiobus_write(9) page from the Kernel API Manual, and we're gonna make it make sense. π
β¨ SYNOPSIS β¨
Here's the exact signature, no cap:
int mdiobus_write (struct mii_bus *bus , int addr , u32 regnum , u16 val
);
π ARGUMENTS π
busβ themii_busstruct.addrβ the phy address.regnumβ register number to write.valβ value to write toregnum.
π RETURN π
Zero if successful, negative error code on failure. So 0 is the slay outcome, and a negative number means something went sideways π.
β οΈ NOTE β οΈ
MUST NOT be called from interrupt context, because the bus read/write functions may wait for an interrupt to conclude the operation. This is not a drill, bestie β interrupt context is a hard no π.
π SEE ALSO π
Kernel file ./drivers/net/phy/mdio_bus.c is where this lives, and the related squad is:
__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_nested(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)
Okay that's the whole page, bestie π«Ά β source/version path ./drivers/net/phy, dated October 2026, and yes, it's the mdiobus_write(9) manual page. Periodt. π
π¦ 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