ytphy_modify_ext(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ytphy_modify_ext β€” the Kernel API Manual tea πŸ«–

okay bestie, welcome to the ytphy_modify_ext(9) page β€” it's a kernel API manual situation and honestly it's kind of a cute little one ✨


πŸŽ€ NAME πŸŽ€

ytphy_modify_ext β€” bits-modify a PHY's extended register. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

int ytphy_modify_ext (struct phy_device *phydev , u16 regnum , u16 mask
, u16 set );

like, look at her go 😭 she's giving "small function, big responsibility" fr fr


πŸ¦‹ ARGUMENTS πŸ¦‹

  • phydev β€” a pointer to a struct phy_device. yes girl, the whole PHY, right there πŸ‘‘
  • regnum β€” the register number to write. which register are we touching? this one πŸ“
  • mask β€” bit mask of bits to clear. the "bye bye" list πŸ’€
  • set β€” bit mask of bits to set. the "hello gorgeous" list 🫢

⭐ NOTE ⭐

okay so this is a convenience function (iconic, low-effort, high-reward) that lets you modify a PHY's extended register, and the math is literally:

new register value = (old register value & ~mask) | set

read it like a recipe: take the old value, AND it with the inverse of mask to wipe those bits out, then OR in set to light up the ones you want. chef's kiss 🧚

🚨 big important caveat, do NOT skip this one bestie: the caller must have taken the MDIO bus lock. like, must. no cap. that's on you, not on her.

and she returns 0 or a negative error code β€” so zero is the slay outcome, negative means something went sideways 😭


🌈 SEE ALSO 🌈

the whole friend group, no one left out πŸ’– and yeah, the kernel file lives at ./drivers/net/phy/motorcomm.c, go say hi πŸŽ€


and that's the page, bestie 🫢 this little gem lives in ./drivers/net/phy, dated October 2026 β€” go off, read some more manpages, and remember: take the lock. periodt. πŸ’œ

πŸ“¦ where this page comes from