e1000_access...akeup_reg_bm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

e1000_access_phy_wakeup_reg_bm β€” Read/write BM PHY wakeup register ✨

Ok so this is from the Kernel API Manual and it's lowkey a whole vibe β€” it's the little helper that pokes at your BM PHY wakeup register. Bestie, let's get into it πŸŽ€


🌸 SYNOPSIS 🌸

s32 e1000_access_phy_wakeup_reg_bm (struct e1000_hw *hw , u32 offset ,
       u16 *data , bool read , bool page_set );

That signature is iconic and you're gonna copy it exactly, mwah πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hw β€” pointer to the HW structure. Your main character struct, the one holding all the hardware tea 🫢
  • offset β€” register offset to be read or written. It's the "where" of the whole operation, iykyk ✨
  • data β€” pointer to the data to read or write. Depending on direction, this is either where the good stuff lands or where the good stuff comes from πŸ’€
  • read β€” determines if operation is read or write. Literally the vibe check for direction, no cap 🌈
  • page_set β€” BM_WUC_PAGE already set and access enabled. Basically "yeah bestie I already did the setup part" πŸ™ˆ

🧚 DESCRIPTION 🧚

So the deal is: read the PHY register at offset and store the retrieved information in data, or write data to the PHY register at offset. Simple enough, right? πŸ“

BUT. πŸ‘ Here's the plot twist: the procedure to access the PHY wakeup registers is different than reading the other PHY registers. Like, not even close. It works as such:

  1. Set 769.17.2 (page 769, register 17, bit 2) = 1 ⭐
  2. Set page to 800 for host (801 if we were manageability) πŸ’…
  3. Write the address using the address opcode (0x11) πŸ”₯
  4. Read or write the data using the data opcode (0x12) πŸ‘‘
  5. Restore 769.17.2 to its original value πŸŽ€

Steps 1 and 2 are done by e1000_enable_phy_wakeup_reg_access_bm and step 5 is done by e1000_disable_phy_wakeup_reg_access_bm.

Heads up bestie β€” this function assumes semaphore is already acquired. Not it's problem, it's yours. 😭
Also: when page_set==true, it assumes the PHY page is set to BM_WUC_PAGE (i.e. a function in the call stack is responsible for calls to e1000_[enable|disable]_phy_wakeup_reg_bm). So somebody upstream ate that task. Don't leave it hanging, fr fr πŸ™

⭐ SEE ALSO ⭐

Kernel file ./drivers/net/ethernet/intel/e1000e/phy.c

e1000e_check_reset_block_generic(9), e1000e_get_phy_id(9), e1000e_phy_reset_dsp(9), e1000e_read_phy_reg_mdic(9), e1000e_write_phy_reg_mdic(9), e1000e_read_phy_reg_m88(9), e1000e_write_phy_reg_m88(9), e1000_set_page_igp(9), __e1000e_read_phy_reg_igp(9), e1000e_read_phy_reg_igp(9), e1000e_read_phy_reg_igp_locked(9), __e1000e_write_phy_reg_igp(9), e1000e_write_phy_reg_igp(9), e1000e_write_phy_reg_igp_locked(9), __e1000_read_kmrn_reg(9), e1000e_read_kmrn_reg(9), e1000e_read_kmrn_reg_locked(9), __e1000_write_kmrn_reg(9), e1000e_write_kmrn_reg(9), e1000e_write_kmrn_reg_locked(9), e1000_set_master_slave_mode(9), e1000_copper_link_setup_82577(9), e1000e_copper_link_setup_m88(9), e1000e_copper_link_setup_igp(9), e1000_phy_setup_autoneg(9), e1000_copper_link_autoneg(9), e1000e_setup_copper_link(9), e1000e_phy_force_speed_duplex_igp(9), e1000e_phy_force_speed_duplex_m88(9), e1000_phy_force_speed_duplex_ife(9), e1000e_phy_force_speed_duplex_setup(9), e1000e_set_d3_lplu_state(9), e1000e_check_downshift(9), e1000_check_polarity_m88(9), e1000_check_polarity_igp(9), e1000_check_polarity_ife(9), e1000_wait_autoneg(9), e1000e_phy_has_link_generic(9), e1000e_get_cable_length_m88(9), e1000e_get_cable_length_igp_2(9), e1000e_get_phy_info_m88(9), e1000e_get_phy_info_igp(9), e1000_get_phy_info_ife(9), e1000e_phy_sw_reset(9), e1000e_phy_hw_reset_generic(9), e1000e_get_cfg_done_generic(9), e1000e_phy_init_script_igp3(9), e1000e_get_phy_type_from_id(9), e1000e_determine_phy_address(9), e1000_get_phy_addr_for_bm_page(9), e1000e_write_phy_reg_bm(9), e1000e_read_phy_reg_bm(9), e1000e_read_phy_reg_bm2(9), e1000e_write_phy_reg_bm2(9), e1000_enable_phy_wakeup_reg_access_bm(9), e1000_disable_phy_wakeup_reg_access_bm(9), e1000_power_up_phy_copper(9), e1000_power_down_phy_copper(9), __e1000_read_phy_reg_hv(9), e1000_read_phy_reg_hv(9), e1000_read_phy_reg_hv_locked(9), e1000_read_phy_reg_page_hv(9), __e1000_write_phy_reg_hv(9), e1000_write_phy_reg_hv(9), e1000_write_phy_reg_hv_locked(9), e1000_write_phy_reg_page_hv(9), e1000_get_phy_addr_for_hv_page(9), e1000_access_phy_debug_regs_hv(9), e1000_link_stall_workaround_hv(9), e1000_check_polarity_82577(9), e1000_phy_force_speed_duplex_82577(9), e1000_get_phy_info_82577(9), e1000_get_cable_length_82577(9)


πŸ’œ That's the whole page babes β€” sourced straight from ./drivers/net/ethernet/intel/e..., dated October 2026, and yes it's literally the e1000_access...akeup_reg_bm(9) page. Go read the source, slay, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from