drivers/net/ethernet/huawei/hinic3/hinic3_common.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/huawei/hinic3/hinic3_common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/huawei/hinic3/hinic3_common.h- Extension
.h- Size
- 1343 bytes
- Lines
- 56
- 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/device.h
Detected Declarations
struct hinic3_dma_addr_alignstruct hinic3_sgeenum hinic3_wait_returnfunction hinic3_set_sge
Annotated Snippet
struct hinic3_dma_addr_align {
u32 real_size;
void *ori_vaddr;
dma_addr_t ori_paddr;
void *align_vaddr;
dma_addr_t align_paddr;
};
enum hinic3_wait_return {
HINIC3_WAIT_PROCESS_CPL = 0,
HINIC3_WAIT_PROCESS_WAITING = 1,
HINIC3_WAIT_PROCESS_ERR = 2,
};
struct hinic3_sge {
__le32 hi_addr;
__le32 lo_addr;
__le32 len;
__le32 rsvd;
};
static inline void hinic3_set_sge(struct hinic3_sge *sge, dma_addr_t addr,
__le32 len)
{
sge->hi_addr = cpu_to_le32(upper_32_bits(addr));
sge->lo_addr = cpu_to_le32(lower_32_bits(addr));
sge->len = len;
sge->rsvd = 0;
}
int hinic3_dma_zalloc_coherent_align(struct device *dev, u32 size, u32 align,
gfp_t flag,
struct hinic3_dma_addr_align *mem_align);
void hinic3_dma_free_coherent_align(struct device *dev,
struct hinic3_dma_addr_align *mem_align);
typedef enum hinic3_wait_return (*wait_cpl_handler)(void *priv_data);
int hinic3_wait_for_timeout(void *priv_data, wait_cpl_handler handler,
u32 wait_total_ms, u32 wait_once_us);
void hinic3_cmdq_buf_swab32(void *data, int len);
#endif
Annotation
- Immediate include surface: `linux/device.h`.
- Detected declarations: `struct hinic3_dma_addr_align`, `struct hinic3_sge`, `enum hinic3_wait_return`, `function hinic3_set_sge`.
- 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.