genphy_read_abilities(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… genphy_read_abilities(9) β€” like, the Kernel API Manual page, bestie πŸŽ€

okay so real talk: this is section 9 of the Kernel API Manual and honestly it's such a little function with such a big job. genphy_read_abilities β€” say it with me, gen-phy-read-abilities β€” is the one who goes and asks the PHY what it can do. Obsessed.


✨ SYNOPSIS ✨

int genphy_read_abilities (struct phy_device *phydev );

literally that's it. one function, one argument, zero drama. πŸ’…


🫢 ARGUMENTS 🫢

  • phydev β€” the target phy_device struct. that's the one. that's who we're reading from. she's the main character here. πŸ‘‘

🌸 DESCRIPTION 🌸

so what does it actually do? it reads the PHY's abilities β€” and then it populates phydev->supported accordingly. that's the whole vibe. no cap.

the way that it pulls the abilities straight out of the Clause 22 registers?? iconic. it's giving "let me check your resume" energy. πŸ’–


⭐ RETURN ⭐

  • 0 on success πŸ’š
  • < 0 on failure 😭

(and yes, that's "less than zero", not "negative zero", don't @ me β€” anything below 0 means it did not slay.)

ngl, always check the return value. 0 = we ate. below 0 = we did not eat. periodt.

πŸ¦‹ SEE ALSO πŸ¦‹

the friend group is huge, buckle up β€” these all live in the kernel file ./drivers/net/phy/phy_device.c:

like I said. friend group: enormous. iykyk 🌈


and that's the page!! mwah πŸ’‹ she lives in ./drivers/net/phy, dated October 2026, and she's part of the Kernel API Manual (that's section 9, duh). go read your PHY's abilities, bestie β€” you've got this πŸ§šπŸ’œβœ¨

πŸ“¦ where this page comes from