genphy_c37_read_status(9)
π genphy_c37_read_status(9) β like, the Kernel API Manual page, but make it make sense
okay so bestie, welcome to the manual page for genphy_c37_read_status (9) β yes the (9) means it lives in the kernel API section of the manual, we love a section number moment. This one is genuinely so cute and small: it checks the link and updates the current link state. That's it. That's the whole vibe. Let's go π¦
β¨ NAME β¨
genphy_c37_read_status β check the link status and update current link state π
πΈ SYNOPSIS πΈ
int genphy_c37_read_status (struct phy_device *phydev , bool *changed );
like, two args, one int back. she's lowkey minimal and I respect it π
π«Ά ARGUMENTS π«Ά
phydevβ the targetphy_devicestruct, i.e. the PHY we're looking at. main character energy, honestly πchangedβ a pointer to where we store whether the link changed. she's an out-param, so we're writing through her, not copying her π
π₯ DESCRIPTION π₯
So here's the tea: it checks the link, then figures out the current state by comparing what we advertise against what the link partner advertises. It's giving "who said what" detective work but for autonegotiation π΅οΈββοΈ
this function is for Clause 37 1000Base-X mode β specifically that, no cap. don't come here expecting it to handle everything else, she's got a niche π§
If the link has changed, changed is set to true; false otherwise. Periodt. β
π SEE ALSO π
okay so this is the part where the kernel flexes its whole friend group. the file itself is ./drivers/net/phy/phy_device.c β go say hi π
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_config_advert(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_soft_reset(9)genphy_read_abilities(9)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)phy_get_internal_delay(9)phy_get_tx_amplitude_gain(9)phy_get_mac_termination(9)phy_get_sfp_port(9)fwnode_mdio_find_device(9)fwnode_phy_find_device(9)fwnode_get_phy_node(9)phy_probe(9)phy_driver_register(9)
like, the whole PHY extended universe showed up to the group chat ππ₯
β¨ that's the whole page, bestie β mwah π
shoutout to the source directory ./drivers/net/phy, dated October 2026, from the Kernel API Manual itself. she's stamped, she's official, she's iconic πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms