drivers/net/ethernet/huawei/hinic/hinic_hw_io.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic/hinic_hw_io.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/huawei/hinic/hinic_hw_io.h- Extension
.h- Size
- 2605 bytes
- Lines
- 124
- 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.
- 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/types.hlinux/pci.hlinux/semaphore.hlinux/sizes.hhinic_hw_if.hhinic_hw_eqs.hhinic_hw_wq.hhinic_hw_cmdq.hhinic_hw_qp.h
Detected Declarations
struct hinic_free_db_areastruct hinic_nic_cfgstruct hinic_func_to_iostruct hinic_wq_page_sizeenum hinic_db_typeenum hinic_io_path
Annotated Snippet
struct hinic_free_db_area {
int db_idx[HINIC_DB_MAX_AREAS];
int alloc_pos;
int return_pos;
int num_free;
/* Lock for getting db area */
struct semaphore idx_lock;
};
struct hinic_nic_cfg {
/* lock for getting nic cfg */
struct mutex cfg_mutex;
bool pause_set;
u32 auto_neg;
u32 rx_pause;
u32 tx_pause;
};
struct hinic_func_to_io {
struct hinic_hwif *hwif;
struct hinic_hwdev *hwdev;
u16 global_qpn;
struct hinic_ceqs ceqs;
struct hinic_wqs wqs;
struct hinic_wq *sq_wq;
struct hinic_wq *rq_wq;
struct hinic_qp *qps;
u16 max_qps;
u16 sq_depth;
u16 rq_depth;
void __iomem **sq_db;
void __iomem *db_base;
void *ci_addr_base;
dma_addr_t ci_dma_base;
struct hinic_free_db_area free_db_area;
void __iomem *cmdq_db_area[HINIC_MAX_CMDQ_TYPES];
struct hinic_cmdqs cmdqs;
u16 max_vfs;
struct vf_data_storage *vf_infos;
u8 link_status;
struct hinic_nic_cfg nic_cfg;
};
struct hinic_wq_page_size {
u8 status;
u8 version;
u8 rsvd0[6];
u16 func_idx;
u8 ppf_idx;
u8 page_size;
u32 rsvd1;
};
int hinic_set_wq_page_size(struct hinic_hwdev *hwdev, u16 func_idx,
u32 page_size);
int hinic_io_create_qps(struct hinic_func_to_io *func_to_io,
u16 base_qpn, int num_qps,
struct msix_entry *sq_msix_entries,
struct msix_entry *rq_msix_entries);
void hinic_io_destroy_qps(struct hinic_func_to_io *func_to_io,
int num_qps);
int hinic_io_init(struct hinic_func_to_io *func_to_io,
struct hinic_hwif *hwif, u16 max_qps, int num_ceqs,
struct msix_entry *ceq_msix_entries);
void hinic_io_free(struct hinic_func_to_io *func_to_io);
#endif
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `linux/semaphore.h`, `linux/sizes.h`, `hinic_hw_if.h`, `hinic_hw_eqs.h`, `hinic_hw_wq.h`, `hinic_hw_cmdq.h`.
- Detected declarations: `struct hinic_free_db_area`, `struct hinic_nic_cfg`, `struct hinic_func_to_io`, `struct hinic_wq_page_size`, `enum hinic_db_type`, `enum hinic_io_path`.
- Atlas domain: Driver Families / drivers/net.
- 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.