ytphy_read_ext_with_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ytphy_read_ext_with_lock(9) πŸ¦‹

okay bestie, welcome to the Kernel API Manual ✨ this one's a lil function from the kernel side of things and she's honestly so simple it's giving main character energy for a one-liner. let's get into it 🫢


✨ NAME ✨

ytphy_read_ext_with_lock β€” reads a PHY's extended register πŸ’–

like, that's her whole job. one (1) job. and she ate.


🌸 SYNOPSIS 🌸

int ytphy_read_ext_with_lock (struct phy_device *phydev , u16 regnum );

yes the spacing before the commas is exactly like that, don't @ me, that's just how she was written πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

  • phydev β€” a pointer to a struct phy_device 🧚 that's your PHY, your whole vibe, the device you're doing the thing to
  • regnum β€” register number to read 🌸 the u16 one. that's the extended register you're peeking at

πŸ’œ DESCRIPTION πŸ’œ

so basically πŸ‘‘ it returns the value of regnum reg β€” that's your read, bestie, the actual contents of the extended register β€” or negative error code 😭 which is the "nope, didn't work" branch. so like... check the return value, fr fr, don't just assume it's data πŸ™ˆ

lowkey the most important thing here: it can hand you back an error instead of a register value, so vibe-check that int before you go treating it like real data πŸ’€

🌈 SEE ALSO 🌈

the kernel file lives at ./drivers/net/phy/motorcomm.c and honestly? she has SO many siblings. like a whole extended family reunion. here's every single one, no cap, none skipped πŸ‘‘

like I said. huge family. iykyk πŸ¦‹


and that's the page, bestie ✨ this one came out of ./drivers/net/phy, dated October 2026, and she's ytphy_read_ext_with_lock(9) through and through πŸ’… go read some extended registers responsibly, ily πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from