mdiobus_c45_write(9)
β¨ mdiobus_c45_write(9) β¨
okay so bestie, welcome to the mdiobus_c45_write(9) page from the Kernel API Manual β yes that manual, the one we all live in π
. This is the whole vibe: a lil convenience wrapper for writing a given MII mgmt register. Convenience!! We love a function that exists purely to make your life easier π«Ά
πΈ NAME πΈ
mdiobus_c45_write β convenience function for writing a given MII mgmt register β¨
π¦ SYNOPSIS π¦
int mdiobus_c45_write (struct mii_bus *bus , int addr , int devad , u32
regnum , u16 val );
like, that's the whole signature, no cap π
π ARGUMENTS π
busβ themii_busstruct π (the bus bestie in question)addrβ the phy address πdevadβ device address to read π (yes, "read" β that's literally what the manpage says, I'm not gonna gaslight you, keeping it 100 fr fr)regnumβ register number to write βοΈvalβ value to write toregnumπ
β RETURN β
Zero if successful, negative error code on failure β so 0 is your slay outcome, anything negative is the ick π
π₯ NOTE π₯
MUST NOT be called from interrupt context π β because the bus read/write functions may wait for an interrupt to conclude the operation. like it literally has to wait around for an interrupt, so no, you cannot do this from interrupt context, absolutely not, do not even try it π₯
π 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_nested(9)mdiobus_read(9)mdiobus_c45_read(9)mdiobus_c45_read_nested(9)mdiobus_write_nested(9)mdiobus_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!! π§ source path ./drivers/net/phy, dated October 2026, from your fav kernel manual bestie β go write that register, icon behavior only πβ¨π
π¦ 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