phy_aneg_done(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… phy_aneg_done(9) β€” like, the Kernel API Manual but make it make sense

okay so bestie, welcome to phy_aneg_done from the Kernel API Manual ✨ this one's short and sweet and honestly kind of iconic β€” it's the "hey babe, are we negotiated yet?" function πŸŽ€


πŸ’– NAME πŸ’–

phy_aneg_done β€” returns the auto-negotiation status, that's it, that's the whole vibe πŸ¦‹


✨ SYNOPSIS ✨

int phy_aneg_done (struct phy_device *phydev );

literally one argument, one return value, no drama πŸ’…


🌸 ARGUMENTS 🌸

  • phydev β€” the target phy_device struct πŸ‘‘ this is the phy you're asking about, your main character, the one whose auto-negotiation status you wanna know about 🫢

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea β˜• β€” you call this bad boy and it returns the auto-negotiation status from this phydev. And the return value is doing a little three-way split, so pay attention bestie:

  • > 0 β€” success, slay, auto-negotiation went through πŸ’–
  • < 0 β€” error, it's giving red flags 😭 something went wrong
  • 0 β€” nope, not yet β€” auto-negotiation is still pending ⏳ like bestie it is literally still loading
ngl, 0 is the sneaky one πŸ™ˆ don't treat it as a fail, it just means "come back later" β€” auto-negotiation isn't done yet, no cap.

πŸ¦‹ SEE ALSO πŸ¦‹

okay this is the part where the manpage just dumps the entire friend group on you 😭 like everyone from the kernel file ./drivers/net/phy/phy.c showed up to the party πŸŽ‰

phy_print_status(9), phy_get_rate_matching(9), phy_config_interrupt(9), phy_restart_aneg(9), phy_supported_speeds(9), phy_check_valid(9), phy_sanitize_settings(9), phy_mii_ioctl(9), phy_do_ioctl(9), phy_do_ioctl_running(9), __phy_hwtstamp_get(9), __phy_hwtstamp_set(9), phy_queue_state_machine(9), phy_trigger_machine(9), phy_ethtool_get_strings(9), phy_ethtool_get_sset_count(9), phy_ethtool_get_stats(9), __phy_ethtool_get_phy_stats(9), __phy_ethtool_get_link_ext_stats(9), phy_ethtool_get_plca_cfg(9), plca_check_valid(9), phy_ethtool_set_plca_cfg(9), phy_ethtool_get_plca_status(9), phy_start_cable_test(9), phy_start_cable_test_tdr(9), phy_check_link_status(9), phy_inband_caps(9), phy_config_inband(9), _phy_start_aneg(9), phy_start_aneg(9), phy_speed_down(9), phy_speed_up(9), phy_start_machine(9), phy_stop_machine(9), phy_error(9), phy_write_barrier(9), phy_disable_interrupts(9), phy_interrupt(9), phy_enable_interrupts(9), phy_update_stats(9), phy_request_interrupt(9), phy_free_interrupt(9), phy_get_next_update_time(9), phy_state_machine(9), phy_stop(9), phy_start(9), phy_mac_interrupt(9), phy_loopback(9), phy_eee_tx_clock_stop_capable(9), phy_eee_rx_clock_stop(9), phy_init_eee(9), phy_get_eee_err(9), phy_ethtool_get_eee(9), phy_ethtool_set_eee_noneg(9), phy_ethtool_set_eee(9), phy_ethtool_set_wol(9), phy_ethtool_get_wol(9), phy_ethtool_nway_reset(9)

yeah. all of them. i don't make the rules 🧚 i just keep every single reference, fr fr πŸ’œ


and that's the whole page bestie!! no cap, that was a short one 🌈 go read the whole function list above if you want the full lore iykyk

mwah πŸ’‹ this has been phy_aneg_done(9) from the ./drivers/net/phy corner of the Kernel API Manual, dated October 2026 β€” periodt, take care of her, she's iconic πŸ‘‘β­

πŸ“¦ where this page comes from