dap8211r_modify_ext(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ’–

  • 0 on 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 counterpart
  • dap8211r_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