dap8211r_modify_ext(9)
π dap8211r_modify_ext(9) β ok bestie, this is a kernel API manual page β¨
Hiii so you found dap8211r_modify_ext in the Kernel API Manual β iconic of you, honestly. Sit down, grab a strawberry drink π, and let's get into it.
πΈ NAME πΈ
dap8211r_modify_ext β it modifies bits in an extended register. That's it, that's the whole vibe. Bit-fiddling, but make it PHY-core π
β¨ SYNOPSIS β¨
int dap8211r_modify_ext (struct phy_device *phydev , u16 reg , u16 mask
, u16 set );
Yeah, it returns an int, and yes, all four args are right there, comma-and-all. Copy it exactly, bestie, no freestyling π
π ARGUMENTS π
phydevβ the PHY device structure. Your whole device situation, in struct form.regβ the extended register address. Which extended register we're messing with.maskβ bit mask of bits to clear. The "no thank you" bits π«setβ bit mask of bits to set. The "yes queen" bits π
π¦ DESCRIPTION π¦
So what it does: it modifies a PHY extended register using the indirect access method. Not direct. Indirect. Iykyk β¨
The glow-up formula is literally this, no cap:
New value = (old value & ~mask) | set
Read it out loud with me: take the old value, AND it with the complement of mask (that clears your masked bits), then OR in set (that sets your set bits). Boom. Bits modified. Slay π₯
β οΈ Real talk, and I mean it: the caller must hold the MDIO bus lock. That's not a suggestion, bestie, that's a requirement. You do not want to be out here touching this without the lock. Do not test me on this one π
π RETURN π
0on success β we love a clean zero π«Ά- or a negative error code β aka something went wrong, check it, don't ignore it π
π SEE ALSO π
- Kernel file
./drivers/net/phy/dap8211r.cβ the source, go read it, it's giving main character energy π dap8211r_read_ext(9)β the reading counterpartdap8211r_config_init(9)β the config init one
β okay that's the whole page, tysm for coming to my TED talk β
Sign-off corner: this little beauty lives under ./drivers/net/phy, dated October 2026, and it's filed as dap8211r_modify_ext(9). Byeee, go hold that MDIO bus lock ππ§
π¦ 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