yt8521_modif...p_fiber_bmcr(9)
π yt8521_modify_utp_fiber_bmcr
okay bestie, so this is a page straight out of the Kernel API Manual β yes, that manual β and it's about poking at a PHY's BMCR register. stay with me, it's actually cute π
β¨ NAME β¨
yt8521_modify_utp_fiber_bmcr β bits-modify a PHY's BMCR register π¦
πΈ SYNOPSIS πΈ
int yt8521_modify_utp_fiber_bmcr (struct phy_device *phydev , u16 mask ,
u16 set );
π ARGUMENTS π
phydevβ thephy_devicestruct. the main character, honestly πmaskβ bit mask of bits to clear. the "not me deleting these bits" energy πsetβ bit mask of bits to set. the "slay, we're turning these ON" energy β¨
β NOTE β
so this is a convenience function that lets you modify a PHY's BMCR register like this, and I need you to memorize the formula fr fr:
new register value = (old register value & ~mask) | set π
here's the tea on YT8521: it has two space (utp/fiber) and three mode (utp/fiber/poll), and each space has MII_BMCR. poll mode combines utp and faber, so you need to do both. no cap, both of them π
it returns 0 or a negative errno code β so check that return value, bestie, don't just vibe past it π
lowkey important: the return being a negative errno code means a bad time is possible. treat a non-zero return as your sign from the universe π
π₯ SEE ALSO π₯
Kernel file ./drivers/net/phy/motorcomm.c β and honestly the whole friend group shows up here:
ytphy_read_ext(9)ytphy_read_ext_with_lock(9)ytphy_write_ext(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_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)
and that's the whole page, bestie π«Ά this one lives in ./drivers/net/phy, dated October 2026, and the header/footer vibe check was yt8521_modif...p_fiber_bmcr(9) on both ends. go forth and modify those bits ππ
π¦ 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