ytphy_write_ext(9)
π ytphy_write_ext(9) β the Kernel API Manual, but make it cute
okay so bestie, welcome to ytphy_write_ext(9) from the Kernel API Manual β¨ this one is short and sweet and it's literally just "write a PHY's extended register." That's the whole vibe. Let's get into it π«Ά
πΈ NAME πΈ
ytphy_write_ext β write a PHY's extended register π
π SYNOPSIS π
int ytphy_write_ext (struct phy_device *phydev , u16 regnum , u16 val );
like, that's the whole signature, no cap. int in, int out (well, error code out, but we'll get there) π
β¨ ARGUMENTS β¨
phydevβ a pointer to astruct phy_deviceπ¦ this is your PHY bestie, the actual device you're messing withregnumβ register number to write π― which extended register you're aiming atvalβ value to write toregnumβ the thing you're putting in there, bestie
π NOTE π
okay this part is important, do not skip it π
The caller must have taken the MDIO bus lock. fr fr, you gotta hold that lock before you call this β it's not gonna do it for you, and if you don't, that's on you π
It returns 0 or a negative error code. So 0 = slay, negative = something went sideways π
π SEE ALSO π
so like, this function doesn't exist alone, it's part of a whole friend group π and the kernel file where all this lives is ./drivers/net/phy/motorcomm.c β that's the source of truth, iykyk π
Here's the whole squad, every single one, no skipping π:
ytphy_read_ext(9)ytphy_read_ext_with_lock(9)ytphy_write_ext_with_lock(9)ytphy_modify_ext(9)ytphy_modify_ext_with_lock(9)ytphy_get_wol(9)ytphy_set_wol(9)yt8521_read_page(9)yt8521_write_page(9)struct ytphy_cfg_reg_map(9)struct ytphy_ldo_vol_map(9)yt8521_probe(9)ytphy_utp_read_lpa(9)yt8521_adjust_status(9)yt8521_read_status_paged(9)yt8521_read_status(9)yt8521_modify_bmcr_paged(9)yt8521_modify_utp_fiber_bmcr(9)yt8521_soft_reset(9)yt8521_suspend(9)yt8521_resume(9)yt8521_config_init(9)yt8531_link_change_notify(9)yt8521_prepare_fiber_features(9)yt8521_fiber_setup_forced(9)ytphy_check_and_restart_aneg(9)yt8521_fiber_config_aneg(9)ytphy_setup_master_slave(9)ytphy_utp_config_advert(9)ytphy_utp_config_aneg(9)yt8521_config_aneg_paged(9)yt8521_config_aneg(9)yt8521_aneg_done_paged(9)yt8521_aneg_done(9)ytphy_utp_read_abilities(9)yt8521_get_features_paged(9)yt8521_get_features(9)yt8821_get_features(9)yt8821_get_rate_matching(9)yt8821_aneg_done(9)yt8821_serdes_init(9)yt8821_utp_init(9)yt8821_auto_sleep_config(9)yt8821_soft_reset(9)yt8821_config_init(9)yt8821_adjust_status(9)yt8821_update_interface(9)yt8821_read_status(9)yt8821_modify_utp_fiber_bmcr(9)yt8821_suspend(9)yt8821_resume(9)
like, that's a lot of siblings, but they're all iconic in their own way πΈ
okay that's the whole page, bestie, you're officially educated π this one came out of ./drivers/net/phy, dated October 2026 β mwah, love that for us ππ¦
π¦ 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