drivers/infiniband/hw/ocrdma/ocrdma_sli.h
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/ocrdma/ocrdma_sli.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/ocrdma/ocrdma_sli.h- Extension
.h- Size
- 56031 bytes
- Lines
- 2241
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct ocrdma_mbx_hdrstruct ocrdma_mbx_rspstruct ocrdma_mqe_sgestruct ocrdma_mqe_hdrstruct ocrdma_mqe_emb_cmdstruct ocrdma_mqestruct ocrdma_delete_q_reqstruct ocrdma_pastruct ocrdma_create_eq_reqstruct ocrdma_create_eq_rspstruct ocrmda_set_eqdstruct ocrdma_modify_eqd_cmdstruct ocrdma_modify_eqd_reqstruct ocrdma_modify_eq_delay_rspstruct ocrdma_mcqestruct ocrdma_ae_mcqestruct ocrdma_ae_pvid_mcqestruct ocrdma_ae_mpa_mcqestruct ocrdma_ae_qp_mcqestruct ocrdma_ae_lnkst_mcqestruct ocrdma_mbx_query_configstruct ocrdma_fw_ver_rspstruct ocrdma_fw_conf_rspstruct ocrdma_get_phy_info_rspstruct ocrdma_get_link_speed_rspstruct ocrdma_create_cq_cmdstruct ocrdma_create_cqstruct ocrdma_create_cq_cmd_rspstruct ocrdma_create_cq_rspstruct ocrdma_create_mq_reqstruct ocrdma_create_mq_rspstruct ocrdma_destroy_cqstruct ocrdma_destroy_cq_rspstruct ocrdma_create_qp_reqstruct ocrdma_create_qp_rspstruct ocrdma_destroy_qpstruct ocrdma_destroy_qp_rspstruct ocrdma_qp_paramsstruct ocrdma_modify_qpstruct ocrdma_modify_qp_rspstruct ocrdma_query_qpstruct ocrdma_query_qp_rspstruct ocrdma_create_srqstruct ocrdma_create_srq_rspstruct ocrdma_modify_srqstruct ocrdma_query_srqstruct ocrdma_query_srq_rspstruct ocrdma_destroy_srq
Annotated Snippet
struct ocrdma_mbx_hdr {
u32 subsys_op;
u32 timeout; /* in seconds */
u32 cmd_len;
u32 rsvd_version;
};
enum {
OCRDMA_MBX_RSP_OPCODE_SHIFT = 0,
OCRDMA_MBX_RSP_OPCODE_MASK = 0xFF,
OCRDMA_MBX_RSP_SUBSYS_SHIFT = 8,
OCRDMA_MBX_RSP_SUBSYS_MASK = 0xFF << OCRDMA_MBX_RSP_SUBSYS_SHIFT,
OCRDMA_MBX_RSP_STATUS_SHIFT = 0,
OCRDMA_MBX_RSP_STATUS_MASK = 0xFF,
OCRDMA_MBX_RSP_ASTATUS_SHIFT = 8,
OCRDMA_MBX_RSP_ASTATUS_MASK = 0xFF << OCRDMA_MBX_RSP_ASTATUS_SHIFT
};
/* mailbox cmd response */
struct ocrdma_mbx_rsp {
u32 subsys_op;
u32 status;
u32 rsp_len;
u32 add_rsp_len;
};
enum {
OCRDMA_MQE_EMBEDDED = 1,
OCRDMA_MQE_NONEMBEDDED = 0
};
struct ocrdma_mqe_sge {
u32 pa_lo;
u32 pa_hi;
u32 len;
};
enum {
OCRDMA_MQE_HDR_EMB_SHIFT = 0,
OCRDMA_MQE_HDR_EMB_MASK = BIT(0),
OCRDMA_MQE_HDR_SGE_CNT_SHIFT = 3,
OCRDMA_MQE_HDR_SGE_CNT_MASK = 0x1F << OCRDMA_MQE_HDR_SGE_CNT_SHIFT,
OCRDMA_MQE_HDR_SPECIAL_SHIFT = 24,
OCRDMA_MQE_HDR_SPECIAL_MASK = 0xFF << OCRDMA_MQE_HDR_SPECIAL_SHIFT
};
struct ocrdma_mqe_hdr {
u32 spcl_sge_cnt_emb;
u32 pyld_len;
u32 tag_lo;
u32 tag_hi;
u32 rsvd3;
};
struct ocrdma_mqe_emb_cmd {
struct ocrdma_mbx_hdr mch;
u8 pyld[220];
};
struct ocrdma_mqe {
struct ocrdma_mqe_hdr hdr;
union {
struct ocrdma_mqe_emb_cmd emb_req;
struct {
struct ocrdma_mqe_sge sge[19];
} nonemb_req;
u8 cmd[236];
struct ocrdma_mbx_rsp rsp;
} u;
};
#define OCRDMA_EQ_LEN 4096
#define OCRDMA_MQ_CQ_LEN 256
#define OCRDMA_MQ_LEN 128
#define PAGE_SHIFT_4K 12
#define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K)
/* Returns number of pages spanned by the data starting at the given addr */
#define PAGES_4K_SPANNED(_address, size) \
((u32)((((size_t)(_address) & (PAGE_SIZE_4K - 1)) + \
(size) + (PAGE_SIZE_4K - 1)) >> PAGE_SHIFT_4K))
struct ocrdma_delete_q_req {
struct ocrdma_mbx_hdr req;
u32 id;
};
struct ocrdma_pa {
Annotation
- Detected declarations: `struct ocrdma_mbx_hdr`, `struct ocrdma_mbx_rsp`, `struct ocrdma_mqe_sge`, `struct ocrdma_mqe_hdr`, `struct ocrdma_mqe_emb_cmd`, `struct ocrdma_mqe`, `struct ocrdma_delete_q_req`, `struct ocrdma_pa`, `struct ocrdma_create_eq_req`, `struct ocrdma_create_eq_rsp`.
- Atlas domain: Driver Families / drivers/infiniband.
- 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.