drivers/net/ethernet/cavium/thunder/thunder_xcv.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/thunder/thunder_xcv.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/thunder/thunder_xcv.c- Extension
.c- Size
- 5371 bytes
- Lines
- 232
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- 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/module.hlinux/interrupt.hlinux/pci.hlinux/netdevice.hlinux/etherdevice.hlinux/phy.hlinux/of.hlinux/of_mdio.hlinux/of_net.hnic.hthunder_bgx.h
Detected Declarations
struct xcvfunction xcv_init_hwfunction xcv_setup_linkfunction xcv_probefunction xcv_removefunction xcv_init_modulefunction xcv_cleanup_modulemodule init xcv_init_moduleexport xcv_init_hwexport xcv_setup_link
Annotated Snippet
static struct pci_driver xcv_driver = {
.name = DRV_NAME,
.id_table = xcv_id_table,
.probe = xcv_probe,
.remove = xcv_remove,
};
static int __init xcv_init_module(void)
{
pr_info("%s, ver %s\n", DRV_NAME, DRV_VERSION);
return pci_register_driver(&xcv_driver);
}
static void __exit xcv_cleanup_module(void)
{
pci_unregister_driver(&xcv_driver);
}
module_init(xcv_init_module);
module_exit(xcv_cleanup_module);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/module.h`, `linux/interrupt.h`, `linux/pci.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/phy.h`, `linux/of.h`.
- Detected declarations: `struct xcv`, `function xcv_init_hw`, `function xcv_setup_link`, `function xcv_probe`, `function xcv_remove`, `function xcv_init_module`, `function xcv_cleanup_module`, `module init xcv_init_module`, `export xcv_init_hw`, `export xcv_setup_link`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern 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.