drivers/net/ethernet/intel/e1000e/80003es2lan.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/e1000e/80003es2lan.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/e1000e/80003es2lan.c- Extension
.c- Size
- 37363 bytes
- Lines
- 1412
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
e1000.h
Detected Declarations
function e1000_init_phy_params_80003es2lanfunction e1000_init_nvm_params_80003es2lanfunction e1000_init_mac_params_80003es2lanfunction e1000_get_variants_80003es2lanfunction e1000_acquire_phy_80003es2lanfunction e1000_release_phy_80003es2lanfunction e1000_acquire_mac_csr_80003es2lanfunction e1000_release_mac_csr_80003es2lanfunction e1000_acquire_nvm_80003es2lanfunction e1000_release_nvm_80003es2lanfunction e1000_acquire_swfw_sync_80003es2lanfunction e1000_release_swfw_sync_80003es2lanfunction e1000_read_phy_reg_gg82563_80003es2lanfunction e1000_write_phy_reg_gg82563_80003es2lanfunction e1000_write_nvm_80003es2lanfunction e1000_get_cfg_done_80003es2lanfunction e1000_phy_force_speed_duplex_80003es2lanfunction e1000_get_cable_length_80003es2lanfunction e1000_get_link_up_info_80003es2lanfunction e1000_reset_hw_80003es2lanfunction e1000_init_hw_80003es2lanfunction e1000_initialize_hw_bits_80003es2lanfunction e1000_copper_link_setup_gg82563_80003es2lanfunction e1000_setup_copper_link_80003es2lanfunction e1000_cfg_on_link_up_80003es2lanfunction e1000_cfg_kmrn_10_100_80003es2lanfunction e1000_cfg_kmrn_1000_80003es2lanfunction e1000_read_kmrn_reg_80003es2lanfunction e1000_write_kmrn_reg_80003es2lanfunction e1000_read_mac_addr_80003es2lanfunction e1000_power_down_phy_copper_80003es2lanfunction e1000_clear_hw_cntrs_80003es2lan
Annotated Snippet
if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) {
e1000_release_phy_80003es2lan(hw);
return -E1000_ERR_PHY;
}
usleep_range(200, 400);
ret_val = e1000e_read_phy_reg_mdic(hw,
MAX_PHY_REG_ADDRESS & offset,
data);
usleep_range(200, 400);
} else {
ret_val = e1000e_read_phy_reg_mdic(hw,
MAX_PHY_REG_ADDRESS & offset,
data);
}
e1000_release_phy_80003es2lan(hw);
return ret_val;
}
/**
* e1000_write_phy_reg_gg82563_80003es2lan - Write GG82563 PHY register
* @hw: pointer to the HW structure
* @offset: offset of the register to read
* @data: value to write to the register
*
* Write to the GG82563 PHY register.
**/
static s32 e1000_write_phy_reg_gg82563_80003es2lan(struct e1000_hw *hw,
u32 offset, u16 data)
{
s32 ret_val;
u32 page_select;
u16 temp;
ret_val = e1000_acquire_phy_80003es2lan(hw);
if (ret_val)
return ret_val;
/* Select Configuration Page */
if ((offset & MAX_PHY_REG_ADDRESS) < GG82563_MIN_ALT_REG) {
page_select = GG82563_PHY_PAGE_SELECT;
} else {
/* Use Alternative Page Select register to access
* registers 30 and 31
*/
page_select = GG82563_PHY_PAGE_SELECT_ALT;
}
temp = (u16)((u16)offset >> GG82563_PAGE_SHIFT);
ret_val = e1000e_write_phy_reg_mdic(hw, page_select, temp);
if (ret_val) {
e1000_release_phy_80003es2lan(hw);
return ret_val;
}
if (hw->dev_spec.e80003es2lan.mdic_wa_enable) {
/* The "ready" bit in the MDIC register may be incorrectly set
* before the device has completed the "Page Select" MDI
* transaction. So we wait 200us after each MDI command...
*/
usleep_range(200, 400);
/* ...and verify the command was successful. */
ret_val = e1000e_read_phy_reg_mdic(hw, page_select, &temp);
if (((u16)offset >> GG82563_PAGE_SHIFT) != temp) {
e1000_release_phy_80003es2lan(hw);
return -E1000_ERR_PHY;
}
usleep_range(200, 400);
ret_val = e1000e_write_phy_reg_mdic(hw,
MAX_PHY_REG_ADDRESS &
offset, data);
usleep_range(200, 400);
} else {
ret_val = e1000e_write_phy_reg_mdic(hw,
MAX_PHY_REG_ADDRESS &
offset, data);
}
e1000_release_phy_80003es2lan(hw);
return ret_val;
Annotation
- Immediate include surface: `e1000.h`.
- Detected declarations: `function e1000_init_phy_params_80003es2lan`, `function e1000_init_nvm_params_80003es2lan`, `function e1000_init_mac_params_80003es2lan`, `function e1000_get_variants_80003es2lan`, `function e1000_acquire_phy_80003es2lan`, `function e1000_release_phy_80003es2lan`, `function e1000_acquire_mac_csr_80003es2lan`, `function e1000_release_mac_csr_80003es2lan`, `function e1000_acquire_nvm_80003es2lan`, `function e1000_release_nvm_80003es2lan`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.