drivers/infiniband/hw/erdma/erdma_main.c
Source file repositories/reference/linux-study-clean/drivers/infiniband/hw/erdma/erdma_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/infiniband/hw/erdma/erdma_main.c- Extension
.c- Size
- 16139 bytes
- Lines
- 684
- Domain
- Driver Families
- Bucket
- drivers/infiniband
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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
linux/module.hnet/addrconf.hrdma/erdma-abi.herdma.herdma_cm.herdma_verbs.h
Detected Declarations
function erdma_netdev_eventfunction erdma_enum_and_get_netdevfunction erdma_device_registerfunction erdma_comm_irq_handlerfunction erdma_request_vectorsfunction erdma_comm_irq_initfunction erdma_comm_irq_uninitfunction erdma_device_initfunction erdma_device_uninitfunction erdma_hw_resetfunction erdma_wait_hw_init_donefunction erdma_probe_devfunction erdma_remove_devfunction erdma_dev_attrs_initfunction erdma_device_configfunction erdma_res_cb_initfunction erdma_res_cb_freefunction erdma_ib_device_addfunction erdma_ib_device_removefunction erdma_probefunction erdma_removefunction erdma_init_modulefunction erdma_exit_modulemodule init erdma_init_module
Annotated Snippet
static struct pci_driver erdma_pci_driver = {
.name = DRV_MODULE_NAME,
.id_table = erdma_pci_tbl,
.probe = erdma_probe,
.remove = erdma_remove
};
MODULE_DEVICE_TABLE(pci, erdma_pci_tbl);
static __init int erdma_init_module(void)
{
int ret;
ret = erdma_cm_init();
if (ret)
return ret;
ret = pci_register_driver(&erdma_pci_driver);
if (ret)
erdma_cm_exit();
return ret;
}
static void __exit erdma_exit_module(void)
{
pci_unregister_driver(&erdma_pci_driver);
erdma_cm_exit();
}
module_init(erdma_init_module);
module_exit(erdma_exit_module);
Annotation
- Immediate include surface: `linux/module.h`, `net/addrconf.h`, `rdma/erdma-abi.h`, `erdma.h`, `erdma_cm.h`, `erdma_verbs.h`.
- Detected declarations: `function erdma_netdev_event`, `function erdma_enum_and_get_netdev`, `function erdma_device_register`, `function erdma_comm_irq_handler`, `function erdma_request_vectors`, `function erdma_comm_irq_init`, `function erdma_comm_irq_uninit`, `function erdma_device_init`, `function erdma_device_uninit`, `function erdma_hw_reset`.
- Atlas domain: Driver Families / drivers/infiniband.
- Implementation status: pattern 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.