drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/huawei/hinic3/hinic3_cmdq.h- Extension
.h- Size
- 4199 bytes
- Lines
- 172
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dmapool.hhinic3_hw_intf.hhinic3_wq.h
Detected Declarations
struct cmdq_dbstruct cmdq_headerstruct cmdq_lcmd_bufdescstruct cmdq_statusstruct cmdq_ctrlstruct cmdq_direct_respstruct cmdq_completionstruct cmdq_wqe_scmdstruct cmdq_wqe_lcmdstruct cmdq_wqestruct hinic3_cmd_bufstruct hinic3_cmd_buf_pairstruct hinic3_cmdq_cmd_infostruct hinic3_cmdqstruct hinic3_cmdqsenum hinic3_cmdq_typeenum hinic3_cmdq_statusenum hinic3_cmdq_cmd_type
Annotated Snippet
struct cmdq_db {
__le32 db_head;
__le32 db_info;
};
/* hw defined cmdq wqe header */
struct cmdq_header {
__le32 header_info;
__le32 saved_data;
};
struct cmdq_lcmd_bufdesc {
struct hinic3_sge sge;
__le64 rsvd2;
__le64 rsvd3;
};
struct cmdq_status {
__le32 status_info;
};
struct cmdq_ctrl {
__le32 ctrl_info;
};
struct cmdq_direct_resp {
__le64 val;
__le64 rsvd;
};
struct cmdq_completion {
union {
struct hinic3_sge sge;
struct cmdq_direct_resp direct;
} resp;
};
struct cmdq_wqe_scmd {
struct cmdq_header header;
__le64 rsvd3;
struct cmdq_status status;
struct cmdq_ctrl ctrl;
struct cmdq_completion completion;
__le32 rsvd10[6];
};
struct cmdq_wqe_lcmd {
struct cmdq_header header;
struct cmdq_status status;
struct cmdq_ctrl ctrl;
struct cmdq_completion completion;
struct cmdq_lcmd_bufdesc buf_desc;
};
struct cmdq_wqe {
union {
struct cmdq_wqe_scmd wqe_scmd;
struct cmdq_wqe_lcmd wqe_lcmd;
};
};
static_assert(sizeof(struct cmdq_wqe) == 64);
enum hinic3_cmdq_type {
HINIC3_CMDQ_SYNC = 0,
HINIC3_MAX_CMDQ_TYPES = 4
};
enum hinic3_cmdq_status {
HINIC3_CMDQ_ENABLE = BIT(0),
};
enum hinic3_cmdq_cmd_type {
HINIC3_CMD_TYPE_NONE,
HINIC3_CMD_TYPE_SET_ARM,
HINIC3_CMD_TYPE_DIRECT_RESP,
HINIC3_CMD_TYPE_SGE_RESP,
HINIC3_CMD_TYPE_FAKE_TIMEOUT,
HINIC3_CMD_TYPE_TIMEOUT,
HINIC3_CMD_TYPE_FORCE_STOP,
};
struct hinic3_cmd_buf {
void *buf;
dma_addr_t dma_addr;
__le16 size;
refcount_t ref_cnt;
};
struct hinic3_cmd_buf_pair {
Annotation
- Immediate include surface: `linux/dmapool.h`, `hinic3_hw_intf.h`, `hinic3_wq.h`.
- Detected declarations: `struct cmdq_db`, `struct cmdq_header`, `struct cmdq_lcmd_bufdesc`, `struct cmdq_status`, `struct cmdq_ctrl`, `struct cmdq_direct_resp`, `struct cmdq_completion`, `struct cmdq_wqe_scmd`, `struct cmdq_wqe_lcmd`, `struct cmdq_wqe`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.