drivers/infiniband/hw/hns/hns_roce_hw_v2.c
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/hns/hns_roce_hw_v2.c- Extension
.c- Size
- 212862 bytes
- Lines
- 7670
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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.
- 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/acpi.hlinux/cleanup.hlinux/etherdevice.hlinux/interrupt.hlinux/iopoll.hlinux/kernel.hlinux/types.hlinux/workqueue.hnet/addrconf.hrdma/ib_addr.hrdma/ib_cache.hrdma/ib_umem.hrdma/uverbs_ioctl.hhclge_main.hhns_roce_common.hhns_roce_device.hhns_roce_cmd.hhns_roce_hem.hhns_roce_hw_v2.hhns_roce_bond.hhns_roce_trace.h
Detected Declarations
struct hns_roce_drain_cqeenum ecc_resource_typefunction set_data_seg_v2function to_hr_opcodefunction set_frmr_segfunction set_atomic_segfunction fill_ext_sge_inl_datafunction set_extend_sgefunction check_inl_data_lenfunction set_rc_inlfunction set_rwqe_data_segfunction check_send_validfunction calc_wr_sge_numfunction get_immtdatafunction set_ud_opcodefunction fill_ud_avfunction set_ud_wqefunction set_rc_opcodefunction set_rc_wqefunction update_sq_dbfunction update_rq_dbfunction hns_roce_write512function write_dwqefunction hns_roce_v2_post_sendfunction check_recv_validfunction fill_recv_sge_to_wqefunction fill_rq_wqefunction hns_roce_v2_post_recvfunction hns_roce_push_drain_wrfunction hns_roce_drain_qp_donefunction handle_drain_completionfunction hns_roce_handle_device_errfunction hns_roce_v2_drain_rqfunction hns_roce_v2_drain_sqfunction hns_roce_free_srq_wqefunction hns_roce_srqwq_overflowfunction check_post_srq_validfunction get_srq_wqe_idxfunction fill_wqe_idxfunction update_srq_dbfunction hns_roce_v2_post_srq_recvfunction hns_roce_v2_cmd_hw_resetedfunction hns_roce_v2_cmd_hw_resettingfunction hns_roce_v2_cmd_sw_resettingfunction check_aedev_reset_statusfunction check_device_is_in_resetfunction v2_chk_mbox_is_availfunction hns_roce_alloc_cmq_desc
Annotated Snippet
module_init(hns_roce_hw_v2_init);
module_exit(hns_roce_hw_v2_exit);
MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Wei Hu <xavier.huwei@huawei.com>");
MODULE_AUTHOR("Lijun Ou <oulijun@huawei.com>");
MODULE_AUTHOR("Shaobo Xu <xushaobo2@huawei.com>");
MODULE_DESCRIPTION("Hisilicon Hip08 Family RoCE Driver");
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/cleanup.h`, `linux/etherdevice.h`, `linux/interrupt.h`, `linux/iopoll.h`, `linux/kernel.h`, `linux/types.h`, `linux/workqueue.h`.
- Detected declarations: `struct hns_roce_drain_cqe`, `enum ecc_resource_type`, `function set_data_seg_v2`, `function to_hr_opcode`, `function set_frmr_seg`, `function set_atomic_seg`, `function fill_ext_sge_inl_data`, `function set_extend_sge`, `function check_inl_data_len`, `function set_rc_inl`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: integration 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.