genphy_config_advert(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ genphy_config_advert(9) ✨

okay so bestie, this is genphy_config_advert from the Kernel API Manual, and it is literally the function that decides what your PHY is allowed to brag about. auto-negotiation clout-checking. iconic behavior honestly πŸ’…


🌸 NAME 🌸

genphy_config_advert β€” sanitize and advertise auto-negotiation parameters πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int genphy_config_advert (struct phy_device *phydev , const unsigned long *advert );

πŸ’– ARGUMENTS πŸ’–

  • phydev β€” the target phy_device struct. this is the main character of the whole operation 🫢
  • advert β€” the auto-negotiation parameters you want to advertise. the vibes you're putting out into the world ✨

πŸ”₯ DESCRIPTION πŸ”₯

So what it does: it writes MII_ADVERTISE with the appropriate values β€” but only after sanitizing those values to make sure we only advertise what is actually supported. no cap, it does not let you claim features you don't have. the vibe check happens before the flex πŸ’€

Then it returns an int, and the return value is lowkey the whole story:

  • < 0 on error 😭
  • 0 if the PHY's advertisement hasn't changed 😐 (no notes, same as before)
  • > 0 if it has changed πŸ”₯ (glow up confirmed)
fr fr, 0 does not mean "all good", it means "nothing changed". don't get it twisted bestie πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file: ./drivers/net/phy/phy_device.c

and the whole friend group, in order, periodt πŸ‘‘

phy_uses_state_machine(9), phy_register_fixup(9), genphy_match_phy_device(9), get_phy_c45_ids(9), get_phy_c22_id(9), get_phy_device(9), phy_device_register(9), phy_device_remove(9), phy_get_c45_ids(9), phy_find_next(9), phy_prepare_link(9), phy_connect_direct(9), phy_connect(9), phy_disconnect(9), phy_poll_reset(9), phy_sfp_connect_phy(9), phy_sfp_disconnect_phy(9), phy_sfp_attach(9), phy_sfp_detach(9), phy_sfp_probe(9), phy_attach_direct(9), phy_detach(9), phy_reset_after_clk_enable(9), genphy_c37_config_advert(9), genphy_setup_forced(9), genphy_restart_aneg(9), genphy_check_and_restart_aneg(9), __genphy_config_aneg(9), genphy_c37_config_aneg(9), genphy_aneg_done(9), genphy_update_link(9), genphy_read_status_fixed(9), genphy_read_status(9), genphy_c37_read_status(9), genphy_soft_reset(9), genphy_read_abilities(9)

the pause-and-link-mode girlies 🧚

phy_remove_link_mode(9), phy_advertise_supported(9), phy_advertise_eee_all(9), phy_support_eee(9), phy_disable_eee(9), phy_support_sym_pause(9), phy_support_asym_pause(9), phy_set_sym_pause(9), phy_set_asym_pause(9), phy_validate_pause(9), phy_get_pause(9)

the delay / amplitude / termination / sfp-adjacent icons ⭐

phy_get_internal_delay(9), phy_get_tx_amplitude_gain(9), phy_get_mac_termination(9), phy_get_sfp_port(9)

and the fwnode + driver-registration crowd, slaying as always πŸ‘‘

fwnode_mdio_find_device(9), fwnode_phy_find_device(9), fwnode_get_phy_node(9), phy_probe(9), phy_driver_register(9)


anyway that's the whole page, iykyk. this came from ./drivers/net/phy and the version stamp says October 2026 β€” mwah, obsessed, go read your kernel source bestie πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from