ytphy_utp_config_advert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, ytphy_utp_config_advert is the function that sanitizes and advertises auto-negotiation parameters. That's the whole name-and-description combo, and this iconic page for ytphy_utp_config_advert(9) comes from the Kernel API Manual πŸ’…. It's giving "sanitize first, advertise second," and honestly? She slays.


πŸ¦‹ SYNOPSIS πŸ¦‹

int ytphy_utp_config_advert (struct phy_device *phydev );

πŸŽ€ ARGUMENTS πŸŽ€

  • phydev β€” the target phy_device struct. That's it, that's the whole argument, and yes she's the main character πŸ’–.

πŸ’‘ NOTE πŸ’‘

okay so here's the tea: it writes MII_ADVERTISE with the appropriate values, after sanitizing those values to make sure we only advertise what is supported. Returns < 0 on error, 0 if the PHY's advertisement hasn't changed, and > 0 if it has changed. The caller must have taken the MDIO bus lock. And yeah, it returns 0 or a negative errno code.

⚠️ bestie, the caller must have taken the MDIO bus lock β€” this is not a drill, do not skip it, fr fr.

πŸ”Ž SEE ALSO πŸ”Ž

Bestie, the kernel file is ./drivers/net/phy/motorcomm.c, and the whole squad is literally right here β€” go read through the lore, iykyk:

catch you in the kernel, xoxo from ./drivers/net/phy πŸ’…πŸ¦‹ β€” October 2026

πŸ“¦ where this page comes from