drivers/infiniband/hw/efa/efa_com.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/efa/efa_com.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/efa/efa_com.h- Extension
.h- Size
- 4430 bytes
- Lines
- 183
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/device.hlinux/dma-mapping.hlinux/semaphore.hlinux/sched.hrdma/ib_verbs.hefa_common_defs.hefa_admin_defs.hefa_admin_cmds_defs.hefa_regs_defs.h
Detected Declarations
struct efa_com_admin_cqstruct efa_com_admin_sqstruct efa_com_stats_adminstruct efa_com_admin_queuestruct efa_aenq_handlersstruct efa_com_eqstruct efa_com_aenqstruct efa_com_mmio_readstruct efa_com_devstruct efa_com_eqstruct efa_com_create_eq_paramsstruct efa_com_create_eq_resultstruct efa_com_destroy_eq_paramsstruct efa_aenq_handlers
Annotated Snippet
struct efa_com_admin_cq {
struct efa_admin_acq_entry *entries;
dma_addr_t dma_addr;
spinlock_t lock; /* Protects ACQ */
bool validate_checksum;
u16 cc; /* consumer counter */
u8 phase;
};
struct efa_com_admin_sq {
struct efa_admin_aq_entry *entries;
dma_addr_t dma_addr;
spinlock_t lock; /* Protects ASQ */
u32 __iomem *db_addr;
u16 cc; /* consumer counter */
u16 pc; /* producer counter */
u8 phase;
};
/* Don't use anything other than atomic64 */
struct efa_com_stats_admin {
atomic64_t submitted_cmd;
atomic64_t completed_cmd;
atomic64_t cmd_err;
atomic64_t no_completion;
};
enum {
EFA_AQ_STATE_RUNNING_BIT = 0,
EFA_AQ_STATE_POLLING_BIT = 1,
};
struct efa_com_admin_queue {
void *dmadev;
void *efa_dev;
struct efa_comp_ctx *comp_ctx;
u32 completion_timeout; /* usecs */
u16 poll_interval; /* msecs */
u16 depth;
struct efa_com_admin_cq cq;
struct efa_com_admin_sq sq;
u32 msix_vector_idx;
unsigned long state;
/* Count the number of available admin commands */
struct semaphore avail_cmds;
struct efa_com_stats_admin stats;
spinlock_t comp_ctx_lock; /* Protects completion context pool */
u32 *comp_ctx_pool;
u16 comp_ctx_pool_next;
};
struct efa_aenq_handlers;
struct efa_com_eq;
typedef void (*efa_eqe_handler)(struct efa_com_eq *eeq,
struct efa_admin_eqe *eqe);
struct efa_com_aenq {
struct efa_admin_aenq_entry *entries;
struct efa_aenq_handlers *aenq_handlers;
dma_addr_t dma_addr;
u32 cc; /* consumer counter */
u32 msix_vector_idx;
u16 depth;
u8 phase;
};
struct efa_com_mmio_read {
struct efa_admin_mmio_req_read_less_resp *read_resp;
dma_addr_t read_resp_dma_addr;
u16 seq_num;
u16 mmio_read_timeout; /* usecs */
/* serializes mmio reads */
spinlock_t lock;
};
struct efa_com_dev {
struct efa_com_admin_queue aq;
struct efa_com_aenq aenq;
u8 __iomem *reg_bar;
void *dmadev;
void *efa_dev;
u32 supported_features;
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/semaphore.h`, `linux/sched.h`, `rdma/ib_verbs.h`, `efa_common_defs.h`, `efa_admin_defs.h`.
- Detected declarations: `struct efa_com_admin_cq`, `struct efa_com_admin_sq`, `struct efa_com_stats_admin`, `struct efa_com_admin_queue`, `struct efa_aenq_handlers`, `struct efa_com_eq`, `struct efa_com_aenq`, `struct efa_com_mmio_read`, `struct efa_com_dev`, `struct efa_com_eq`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: source implementation candidate.
- 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.