drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c- Extension
.c- Size
- 116656 bytes
- Lines
- 4103
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ixgbe_common.hixgbe_e610.hixgbe_x550.hixgbe_type.hixgbe_x540.hixgbe_mbx.hixgbe_phy.h
Detected Declarations
function ixgbe_should_retry_aci_send_cmd_executefunction ixgbe_aci_send_cmd_executefunction ixgbe_aci_send_cmdfunction ixgbe_aci_check_event_pendingfunction ixgbe_aci_get_eventfunction ixgbe_fill_dflt_direct_cmd_descfunction commandfunction commandfunction commandfunction ixgbe_acquire_resfunction ixgbe_release_resfunction ixgbe_parse_e610_capsfunction ixgbe_parse_valid_functions_capfunction ixgbe_parse_vf_dev_capsfunction ixgbe_parse_vsi_dev_capsfunction ixgbe_parse_fdir_dev_capsfunction devicefunction ixgbe_parse_vf_func_capsfunction ixgbe_get_num_per_funcfunction ixgbe_parse_vsi_func_capsfunction functionfunction functionfunction ixgbe_discover_dev_capsfunction ixgbe_discover_func_capsfunction ixgbe_get_capsfunction commandfunction commandfunction ixgbe_copy_phy_caps_to_cfgfunction commandfunction ixgbe_aci_set_link_restart_anfunction commandfunction ixgbe_get_media_type_from_phy_typefunction ixgbe_update_link_infofunction ixgbe_get_link_statusfunction commandfunction commandfunction ixgbe_configure_lsefunction start_hwfunction portfunction ixgbe_get_media_type_e610function ixgbe_setup_link_e610function commandfunction ixgbe_get_link_statusfunction ixgbe_get_link_capabilities_e610function ixgbe_cfg_phy_fcfunction ixgbe_setup_fc_e610function ixgbe_fc_autoneg_e610function command
Annotated Snippet
if (desc->flags & cpu_to_le16(LIBIE_AQ_FLAG_RD)) {
for (i = 0; i < buf_size / 4; i++)
IXGBE_WRITE_REG(hw, IXGBE_PF_HIBA(i), ((u32 *)buf)[i]);
if (buf_tail_size)
IXGBE_WRITE_REG(hw, IXGBE_PF_HIBA(i), buf_tail);
}
}
/* Descriptor is written to specific registers */
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
IXGBE_WRITE_REG(hw, IXGBE_PF_HIDA(i), raw_desc[i]);
/* SW has to set PF_HICR.C bit and clear PF_HICR.SV and
* PF_HICR_EV
*/
hicr = (IXGBE_READ_REG(hw, IXGBE_PF_HICR) | IXGBE_PF_HICR_C) &
~(IXGBE_PF_HICR_SV | IXGBE_PF_HICR_EV);
IXGBE_WRITE_REG(hw, IXGBE_PF_HICR, hicr);
#define MAX_SLEEP_RESP_US 1000
#define MAX_TMOUT_RESP_SYNC_US 100000000
/* Wait for sync Admin Command response */
read_poll_timeout(IXGBE_READ_REG, hicr,
(hicr & IXGBE_PF_HICR_SV) ||
!(hicr & IXGBE_PF_HICR_C),
MAX_SLEEP_RESP_US, MAX_TMOUT_RESP_SYNC_US, true, hw,
IXGBE_PF_HICR);
#define MAX_TMOUT_RESP_ASYNC_US 150000000
/* Wait for async Admin Command response */
read_poll_timeout(IXGBE_READ_REG, hicr,
(hicr & IXGBE_PF_HICR_EV) ||
!(hicr & IXGBE_PF_HICR_C),
MAX_SLEEP_RESP_US, MAX_TMOUT_RESP_ASYNC_US, true, hw,
IXGBE_PF_HICR);
/* Read sync Admin Command response */
if ((hicr & IXGBE_PF_HICR_SV))
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA(i));
/* Read async Admin Command response */
if ((hicr & IXGBE_PF_HICR_EV) && !(hicr & IXGBE_PF_HICR_C))
for (i = 0; i < IXGBE_ACI_DESC_SIZE_IN_DWORDS; i++)
raw_desc[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIDA_2(i));
/* Handle timeout and invalid state of HICR register */
if (hicr & IXGBE_PF_HICR_C)
return -ETIME;
if (!(hicr & IXGBE_PF_HICR_SV) && !(hicr & IXGBE_PF_HICR_EV))
return -EIO;
/* For every command other than 0x0014 treat opcode mismatch
* as an error. Response to 0x0014 command read from HIDA_2
* is a descriptor of an event which is expected to contain
* different opcode than the command.
*/
if (desc->opcode != cpu_to_le16(opcode) &&
opcode != ixgbe_aci_opc_get_fw_event)
return -EIO;
if (desc->retval) {
hw->aci.last_status = (enum libie_aq_err)
le16_to_cpu(desc->retval);
return -EIO;
}
/* Write a response values to a buf */
if (valid_buf) {
for (i = 0; i < buf_size / 4; i++)
((u32 *)buf)[i] = IXGBE_READ_REG(hw, IXGBE_PF_HIBA(i));
if (buf_tail_size) {
buf_tail = IXGBE_READ_REG(hw, IXGBE_PF_HIBA(i));
memcpy(buf + buf_size - buf_tail_size, &buf_tail,
buf_tail_size);
}
}
return 0;
}
/**
* ixgbe_aci_send_cmd - send FW Admin Command to FW Admin Command Interface
* @hw: pointer to the HW struct
* @desc: descriptor describing the command
* @buf: buffer to use for indirect commands (NULL for direct commands)
* @buf_size: size of buffer for indirect commands (0 for direct commands)
Annotation
- Immediate include surface: `ixgbe_common.h`, `ixgbe_e610.h`, `ixgbe_x550.h`, `ixgbe_type.h`, `ixgbe_x540.h`, `ixgbe_mbx.h`, `ixgbe_phy.h`.
- Detected declarations: `function ixgbe_should_retry_aci_send_cmd_execute`, `function ixgbe_aci_send_cmd_execute`, `function ixgbe_aci_send_cmd`, `function ixgbe_aci_check_event_pending`, `function ixgbe_aci_get_event`, `function ixgbe_fill_dflt_direct_cmd_desc`, `function command`, `function command`, `function command`, `function ixgbe_acquire_res`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.