drivers/net/ethernet/ibm/ehea/ehea.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ibm/ehea/ehea.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/ibm/ehea/ehea.h- Extension
.h- Size
- 11113 bytes
- Lines
- 478
- 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.
- 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/module.hlinux/ethtool.hlinux/vmalloc.hlinux/if_vlan.hlinux/platform_device.hasm/ibmebus.hasm/io.h
Detected Declarations
struct ehea_pagestruct hw_queuestruct h_epastruct h_epa_userstruct h_epasstruct ehea_dir_bmapstruct ehea_top_bmapstruct ehea_bmapstruct ehea_qpstruct ehea_cqstruct ehea_eqstruct ehea_portstruct ehea_avstruct ehea_qp_init_attrstruct ehea_eq_attrstruct ehea_eqstruct ehea_qpstruct ehea_cq_attrstruct ehea_cqstruct ehea_mrstruct port_statsstruct ehea_q_skb_arrstruct ehea_port_resstruct ehea_adapterstruct ehea_mc_liststruct ehea_fw_handle_entrystruct ehea_fw_handle_arraystruct ehea_bcmc_reg_entrystruct ehea_bcmc_reg_arraystruct ehea_portstruct port_res_cfgenum ehea_flag_bits
Annotated Snippet
struct ehea_page {
u8 entries[PAGE_SIZE];
};
/*
* Generic queue in linux kernel virtual memory
*/
struct hw_queue {
u64 current_q_offset; /* current queue entry */
struct ehea_page **queue_pages; /* array of pages belonging to queue */
u32 qe_size; /* queue entry size */
u32 queue_length; /* queue length allocated in bytes */
u32 pagesize;
u32 toggle_state; /* toggle flag - per page */
u32 reserved; /* 64 bit alignment */
};
/*
* For pSeries this is a 64bit memory address where
* I/O memory is mapped into CPU address space
*/
struct h_epa {
void __iomem *addr;
};
struct h_epa_user {
u64 addr;
};
struct h_epas {
struct h_epa kernel; /* kernel space accessible resource,
set to 0 if unused */
struct h_epa_user user; /* user space accessible resource
set to 0 if unused */
};
/*
* Memory map data structures
*/
struct ehea_dir_bmap
{
u64 ent[EHEA_MAP_ENTRIES];
};
struct ehea_top_bmap
{
struct ehea_dir_bmap *dir[EHEA_MAP_ENTRIES];
};
struct ehea_bmap
{
struct ehea_top_bmap *top[EHEA_MAP_ENTRIES];
};
struct ehea_qp;
struct ehea_cq;
struct ehea_eq;
struct ehea_port;
struct ehea_av;
/*
* Queue attributes passed to ehea_create_qp()
*/
struct ehea_qp_init_attr {
/* input parameter */
u32 qp_token; /* queue token */
u8 low_lat_rq1;
u8 signalingtype; /* cqe generation flag */
u8 rq_count; /* num of receive queues */
u8 eqe_gen; /* eqe generation flag */
u16 max_nr_send_wqes; /* max number of send wqes */
u16 max_nr_rwqes_rq1; /* max number of receive wqes */
u16 max_nr_rwqes_rq2;
u16 max_nr_rwqes_rq3;
u8 wqe_size_enc_sq;
u8 wqe_size_enc_rq1;
u8 wqe_size_enc_rq2;
u8 wqe_size_enc_rq3;
u8 swqe_imm_data_len; /* immediate data length for swqes */
u16 port_nr;
u16 rq2_threshold;
u16 rq3_threshold;
u64 send_cq_handle;
u64 recv_cq_handle;
u64 aff_eq_handle;
/* output parameter */
u32 qp_nr;
u16 act_nr_send_wqes;
u16 act_nr_rwqes_rq1;
u16 act_nr_rwqes_rq2;
u16 act_nr_rwqes_rq3;
Annotation
- Immediate include surface: `linux/module.h`, `linux/ethtool.h`, `linux/vmalloc.h`, `linux/if_vlan.h`, `linux/platform_device.h`, `asm/ibmebus.h`, `asm/io.h`.
- Detected declarations: `struct ehea_page`, `struct hw_queue`, `struct h_epa`, `struct h_epa_user`, `struct h_epas`, `struct ehea_dir_bmap`, `struct ehea_top_bmap`, `struct ehea_bmap`, `struct ehea_qp`, `struct ehea_cq`.
- 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.
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.