drivers/net/ethernet/intel/igb/e1000_82575.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/igb/e1000_82575.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/igb/e1000_82575.c- Extension
.c- Size
- 79168 bytes
- Lines
- 2921
- 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
linux/types.hlinux/if_ether.hlinux/i2c.he1000_mac.he1000_82575.he1000_i210.higb.h
Detected Declarations
function igb_write_vfta_i350function igb_sgmii_uses_mdio_82575function igb_check_for_link_media_swapfunction igb_init_phy_params_82575function igb_init_nvm_params_82575function igb_init_mac_params_82575function igb_set_sfp_media_type_82575function igb_get_invariants_82575function igb_acquire_phy_82575function igb_release_phy_82575function igb_read_phy_reg_sgmii_82575function igb_write_phy_reg_sgmii_82575function igb_get_phy_id_82575function igb_phy_hw_reset_sgmii_82575function igb_set_d0_lplu_state_82575function igb_set_d0_lplu_state_82580function upfunction igb_acquire_nvm_82575function igb_release_nvm_82575function igb_acquire_swfw_sync_82575function igb_release_swfw_sync_82575function igb_get_cfg_done_82575function igb_get_link_up_info_82575function igb_check_for_link_82575function igb_power_up_serdes_link_82575function igb_get_pcs_speed_and_duplex_82575function igb_shutdown_serdes_link_82575function igb_reset_hw_82575function igb_init_hw_82575function igb_setup_copper_link_82575function interfacefunction interfacefunction igb_reset_init_script_82575function igb_read_mac_addr_82575function igb_power_down_phy_copper_82575function igb_clear_hw_cntrs_82575function igb_rx_fifo_flush_82575function igb_set_pcie_completion_timeoutfunction igb_vmdq_set_anti_spoofing_pffunction igb_vmdq_set_loopback_pffunction igb_vmdq_set_replication_pffunction igb_read_phy_reg_82580function igb_write_phy_reg_82580function igb_reset_mdicnfg_82580function devicefunction igb_rxpbs_adjust_82580function igb_validate_nvm_checksum_with_offsetfunction igb_update_nvm_checksum_with_offset
Annotated Snippet
switch (hw->mac.type) {
case e1000_82580:
case e1000_i350:
case e1000_i354:
case e1000_i210:
case e1000_i211:
phy->ops.read_reg = igb_read_phy_reg_82580;
phy->ops.write_reg = igb_write_phy_reg_82580;
break;
default:
phy->ops.read_reg = igb_read_phy_reg_igp;
phy->ops.write_reg = igb_write_phy_reg_igp;
}
}
/* set lan id */
hw->bus.func = FIELD_GET(E1000_STATUS_FUNC_MASK, rd32(E1000_STATUS));
/* Set phy->phy_addr and phy->id. */
ret_val = igb_get_phy_id_82575(hw);
if (ret_val)
return ret_val;
/* Verify phy id and set remaining function pointers */
switch (phy->id) {
case M88E1543_E_PHY_ID:
case M88E1512_E_PHY_ID:
case I347AT4_E_PHY_ID:
case M88E1112_E_PHY_ID:
case M88E1111_I_PHY_ID:
phy->type = e1000_phy_m88;
phy->ops.check_polarity = igb_check_polarity_m88;
phy->ops.get_phy_info = igb_get_phy_info_m88;
if (phy->id != M88E1111_I_PHY_ID)
phy->ops.get_cable_length =
igb_get_cable_length_m88_gen2;
else
phy->ops.get_cable_length = igb_get_cable_length_m88;
phy->ops.force_speed_duplex = igb_phy_force_speed_duplex_m88;
/* Check if this PHY is configured for media swap. */
if (phy->id == M88E1112_E_PHY_ID) {
u16 data;
ret_val = phy->ops.write_reg(hw,
E1000_M88E1112_PAGE_ADDR,
2);
if (ret_val)
goto out;
ret_val = phy->ops.read_reg(hw,
E1000_M88E1112_MAC_CTRL_1,
&data);
if (ret_val)
goto out;
data = FIELD_GET(E1000_M88E1112_MAC_CTRL_1_MODE_MASK,
data);
if (data == E1000_M88E1112_AUTO_COPPER_SGMII ||
data == E1000_M88E1112_AUTO_COPPER_BASEX)
hw->mac.ops.check_for_link =
igb_check_for_link_media_swap;
}
if (phy->id == M88E1512_E_PHY_ID) {
ret_val = igb_initialize_M88E1512_phy(hw);
if (ret_val)
goto out;
}
if (phy->id == M88E1543_E_PHY_ID) {
ret_val = igb_initialize_M88E1543_phy(hw);
if (ret_val)
goto out;
}
break;
case IGP03E1000_E_PHY_ID:
phy->type = e1000_phy_igp_3;
phy->ops.get_phy_info = igb_get_phy_info_igp;
phy->ops.get_cable_length = igb_get_cable_length_igp_2;
phy->ops.force_speed_duplex = igb_phy_force_speed_duplex_igp;
phy->ops.set_d0_lplu_state = igb_set_d0_lplu_state_82575;
phy->ops.set_d3_lplu_state = igb_set_d3_lplu_state;
break;
case I82580_I_PHY_ID:
case I350_I_PHY_ID:
phy->type = e1000_phy_82580;
phy->ops.force_speed_duplex =
igb_phy_force_speed_duplex_82580;
phy->ops.get_cable_length = igb_get_cable_length_82580;
phy->ops.get_phy_info = igb_get_phy_info_82580;
phy->ops.set_d0_lplu_state = igb_set_d0_lplu_state_82580;
phy->ops.set_d3_lplu_state = igb_set_d3_lplu_state_82580;
Annotation
- Immediate include surface: `linux/types.h`, `linux/if_ether.h`, `linux/i2c.h`, `e1000_mac.h`, `e1000_82575.h`, `e1000_i210.h`, `igb.h`.
- Detected declarations: `function igb_write_vfta_i350`, `function igb_sgmii_uses_mdio_82575`, `function igb_check_for_link_media_swap`, `function igb_init_phy_params_82575`, `function igb_init_nvm_params_82575`, `function igb_init_mac_params_82575`, `function igb_set_sfp_media_type_82575`, `function igb_get_invariants_82575`, `function igb_acquire_phy_82575`, `function igb_release_phy_82575`.
- 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.