genphy_c45_read_link(9)
π genphy_c45_read_link(9) π
okay so bestie, welcome to the Kernel API Manual β page genphy_c45_read_link(9), coming at you live from the networking corner of the kernel π¦. This one's a little function, but she's doing main character work: checking whether your link is actually up. Let's get into it β¨
β¨ SYNOPSIS β¨
int genphy_c45_read_link (struct phy_device *phydev );
like, that's the whole vibe. one function, one argument, returns an int.
π ARGUMENTS π
phydevβ the targetstruct phy_device. that's the phy you're pointing at, bestie. she's the one getting her link status read π
πΈ DESCRIPTION πΈ
okay so here's the tea β β this function reads the link status from the specified MMDs. and if all of them are like "yeah we're up," then it sets phydev->link to 1. slay. π
but listen β if an error gets encountered along the way, it returns a negative errno π. so negative = bad vibes, something went wrong. otherwise it returns zero, which is the good ending π«Ά.
so like, quick recap of the return situation: negative errno on trouble, zero when everything's chill. no cap.
π friendly reminder that a0return does not mean the link is up β it means the call didn't error out. the actual up-ness lives inphydev->link. don't confuse the vibe check with the verdict, bestie.
π SEE ALSO π
the whole friend group π«Ά β starting with the kernel file these all live in: ./drivers/net/phy/phy-c45.c
genphy_c45_baset1_able(9)genphy_c45_pma_can_sleep(9)genphy_c45_pma_resume(9)genphy_c45_pma_suspend(9)genphy_c45_pma_baset1_setup_master_slave(9)genphy_c45_pma_setup_forced(9)genphy_c45_an_config_aneg(9)genphy_c45_an_disable_aneg(9)genphy_c45_restart_aneg(9)genphy_c45_check_and_restart_aneg(9)genphy_c45_pma_soft_reset(9)genphy_c45_an_setup_master_slave(9)genphy_c45_read_master_slave(9)genphy_c45_aneg_done(9)genphy_c45_read_lpa(9)genphy_c45_pma_baset1_read_master_slave(9)genphy_c45_read_pma(9)genphy_c45_read_mdix(9)genphy_c45_write_eee_adv(9)genphy_c45_read_eee_adv(9)genphy_c45_read_eee_lpa(9)genphy_c45_read_eee_cap1(9)genphy_c45_read_eee_cap2(9)genphy_c45_read_eee_abilities(9)genphy_c45_an_config_eee_aneg(9)genphy_c45_pma_baset1_read_abilities(9)genphy_c45_pma_read_ext_abilities(9)genphy_c45_pma_read_abilities(9)genphy_c45_read_status(9)genphy_c45_config_aneg(9)genphy_c45_fast_retrain(9)genphy_c45_plca_get_cfg(9)genphy_c45_plca_set_cfg(9)genphy_c45_plca_get_status(9)genphy_c45_eee_is_active(9)genphy_c45_ethtool_get_eee(9)genphy_c45_ethtool_set_eee(9)oatc14_cable_test_get_result_code(9)genphy_c45_oatc14_cable_test_get_status(9)genphy_c45_oatc14_cable_test_start(9)oatc14_update_sqi_capability(9)genphy_c45_oatc14_get_sqi_max(9)genphy_c45_oatc14_get_sqi(9)
like, the way that list just keeps going π but every single one is here, periodt. go click through them, iykyk π
and that's the whole page, babe π she's sourced from ./drivers/net/phy, dated October 2026, and she lives in the Kernel API Manual as genphy_c45_read_link(9). go read some link status. slay π₯π
π¦ 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