mdiobus_c45_modify(9)
π mdiobus_c45_modify β the Kernel API Manual, but make it cute π
okay so bestie, this one lives in the kernel API manual (that's the (9) section, iykyk) and honestly? it's giving "convenience function" in the best way possible. let's get into it β¨
πΈ NAME πΈ
mdiobus_c45_modify β a convenience function for modifying a given mdio device register. that's it. that's the whole vibe. it modifies, it's convenient, it slays π
π¦ SYNOPSIS π¦
int mdiobus_c45_modify (struct mii_bus *bus , int addr , int devad , u32
regnum , u16 mask , u16 set );
no cap, that's the whole signature. six arguments, one int coming back at you. let's break down who's who π«Ά
β¨ ARGUMENTS β¨
busβ themii_busstruct. this is the main character of the whole operation, fr fr πaddrβ the phy address. gotta know which phy we're talking to, obviously.devadβ device address to read. (yes, that's what it says, and yes, we're keeping it exactly like that π)regnumβ register number to write.maskβ bit mask of bits to clear. this is the "what are we yeeting" list πsetβ bit mask of bits to set. this is the "what are we blessing" list β
π₯ RETURN π₯
0on success β the slay outcome π- negative on any error condition β the not-slaying outcome, and it means something went wrong π
ngl bestie, if you get a negative number back, don't just β¨manifestβ¨ it away. something is genuinely up.
π§ SEE ALSO π§
these are all the sibling functions, and honestly the whole friend group is iconic:
- Kernel file
./drivers/net/phy/mdio_bus.c __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(9)mdiobus_c45_write_nested(9)mdiobus_modify(9)mdiobus_modify_changed(9)mdiobus_c45_modify_changed(9)
like, that's the whole group chat right there π go read them, they all ate π₯
and that's the page, bestie!! π source is ./drivers/net/phy, dated October 2026, and the manual name is mdiobus_c45_modify(9) in case you forgot already ππ mwah, go modify 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