drivers/net/ethernet/alibaba/eea/eea_adminq.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/alibaba/eea/eea_adminq.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/alibaba/eea/eea_adminq.c- Extension
.c- Size
- 12522 bytes
- Lines
- 543
- 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
linux/etherdevice.hlinux/iopoll.hlinux/utsname.hlinux/version.heea_adminq.heea_net.heea_pci.heea_ring.h
Detected Declarations
struct eea_aq_createstruct eea_aq_queue_drv_statusstruct eea_aq_host_info_cfgstruct eea_aq_host_info_repfunction eea_device_brokenfunction eea_adminq_submitfunction eea_adminq_execfunction eea_destroy_adminqfunction eea_create_adminqfunction eea_adminq_query_cfgfunction qcfg_fillfunction eea_adminq_create_qfunction eea_adminq_destroy_all_qfunction eea_adminq_dev_statusfunction eea_adminq_config_host_info
Annotated Snippet
struct eea_aq_create {
__le32 flags;
/* queue index.
* rx: 0 == qidx % 2
* tx: 1 == qidx % 2
*/
__le16 qidx;
/* the depth of the queue */
__le16 depth;
/* 0: without SPLIT HDR
* 1: 128B
* 2: 256B
* 3: 512B
*/
u8 hdr_buf_size;
u8 sq_desc_size;
u8 cq_desc_size;
u8 reserve0;
/* The vector for the irq. rx,tx share the same vector */
__le16 msix_vector;
__le16 reserve;
/* sq ring cfg. */
__le32 sq_addr_low;
__le32 sq_addr_high;
/* cq ring cfg. Just valid when flags include EEA_QUEUE_FLAGS_SQCQ. */
__le32 cq_addr_low;
__le32 cq_addr_high;
};
struct eea_aq_queue_drv_status {
__le16 qidx;
__le16 sq_head;
__le16 cq_head;
__le16 reserved;
};
#define EEA_OS_DISTRO 0
#define EEA_DRV_TYPE 0
#define EEA_OS_LINUX 1
#define EEA_SPEC_VER_MAJOR 1
#define EEA_SPEC_VER_MINOR 0
struct eea_aq_host_info_cfg {
__le16 os_type;
__le16 os_dist;
__le16 drv_type;
__le16 kern_ver_major;
__le16 kern_ver_minor;
__le16 kern_ver_sub_minor;
__le16 drv_ver_major;
__le16 drv_ver_minor;
__le16 drv_ver_sub_minor;
__le16 spec_ver_major;
__le16 spec_ver_minor;
__le16 pci_bdf;
__le32 pci_domain;
u8 os_ver_str[64];
u8 isa_str[64];
};
#define EEA_HINFO_MAX_REP_LEN 1024
#define EEA_HINFO_REP_BAD 2
struct eea_aq_host_info_rep {
u8 op_code;
u8 has_reply;
u8 reply_str[EEA_HINFO_MAX_REP_LEN];
};
static struct eea_ring *qid_to_ering(struct eea_net *enet, u32 qid)
{
struct eea_ring *ering;
if (qid % 2 == 0)
ering = enet->rx[qid / 2]->ering;
else
ering = enet->tx[qid / 2].ering;
return ering;
}
#define EEA_AQ_TIMEOUT_US (60 * 1000 * 1000)
static void eea_device_broken(struct eea_net *enet)
{
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/iopoll.h`, `linux/utsname.h`, `linux/version.h`, `eea_adminq.h`, `eea_net.h`, `eea_pci.h`, `eea_ring.h`.
- Detected declarations: `struct eea_aq_create`, `struct eea_aq_queue_drv_status`, `struct eea_aq_host_info_cfg`, `struct eea_aq_host_info_rep`, `function eea_device_broken`, `function eea_adminq_submit`, `function eea_adminq_exec`, `function eea_destroy_adminq`, `function eea_create_adminq`, `function eea_adminq_query_cfg`.
- 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.