phy_modify_mmd_changed(9)
π phy_modify_mmd_changed β NAME energy π
okay so welcome to the Kernel API Manual, bestie π and today's main character is phy_modify_mmd_changed β literally the function for modifying a register on an MMD. that's it, that's the vibe. β¨
β¨ SYNOPSIS β¨
int phy_modify_mmd_changed (struct phy_device *phydev , int devad , u32
regnum , u16 mask , u16 set );
πΈ ARGUMENTS πΈ
phydevβ thephy_devicestruct, aka the whole reason we're here π«Άdevadβ the MMD containing the register you wanna modifyregnumβ the register number to modify, yeah we're getting specificmaskβ bit mask of bits to clear π₯setβ the new value of the bits set inmaskthat get written toregnumβ somaskpicks the seats,setdecides who's sitting in them π
β οΈ NOTE β οΈ
MUST NOT be called from interrupt context, bestie π because the bus read/write functions may wait for an interrupt to conclude the operation. like, it'll just be sitting there waiting, and that's not the moment. periodt.
Return values, listen up: it returns a negative errno, or 0 if there was no change, and 1 in case of change. lowkey obsessed with a function that tells you whether it actually did anything π
π¦ SEE ALSO π¦
Kernel file ./drivers/net/phy/phy-core.c, plus the whole friend group:
phy_speed_to_str(9)phy_duplex_to_str(9)phy_rate_matching_to_str(9)phy_fix_phy_mode_for_mac_delays(9)phy_interface_num_ports(9)phy_set_max_speed(9)of_set_phy_timing_role(9)phy_resolve_aneg_pause(9)phy_resolve_aneg_linkmode(9)phy_check_downshift(9)__phy_read_mmd(9)phy_read_mmd(9)__phy_write_mmd(9)phy_write_mmd(9)phy_modify_changed(9)__phy_modify(9)phy_modify(9)__phy_modify_mmd_changed(9)__phy_modify_mmd(9)phy_modify_mmd(9)phy_save_page(9)phy_select_page(9)phy_restore_page(9)phy_read_paged(9)phy_write_paged(9)phy_modify_paged_changed(9)phy_modify_paged(9)
and that's the page, bestie π§ source lives at ./drivers/net/phy, dated October 2026 β mwah, slay, go modify some registers responsibly ππ
π¦ 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