drivers/net/ethernet/meta/fbnic/fbnic_pci.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic_pci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/meta/fbnic/fbnic_pci.c- Extension
.c- Size
- 15218 bytes
- Lines
- 670
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/module.hlinux/pci.hlinux/rtnetlink.hlinux/types.hnet/devlink.hfbnic.hfbnic_drvinfo.hfbnic_hw_stats.hfbnic_netdev.h
Detected Declarations
function fbnic_rd32function fbnic_fw_presentfunction fbnic_fw_wr32function fbnic_fw_rd32function fbnic_service_task_startfunction fbnic_service_task_stopfunction fbnic_upfunction fbnic_down_noidlefunction fbnic_downfunction fbnic_fw_config_after_crashfunction fbnic_health_checkfunction fbnic_service_taskfunction fbnic_probefunction fbnic_removefunction fbnic_pm_suspendfunction __fbnic_pm_resumefunction __fbnic_pm_attachfunction fbnic_pm_resumefunction fbnic_shutdownfunction fbnic_err_error_detectedfunction fbnic_err_slot_resetfunction fbnic_err_resumefunction fbnic_init_modulefunction fbnic_exit_modulemodule init fbnic_init_module
Annotated Snippet
static struct pci_driver fbnic_driver = {
.name = fbnic_driver_name,
.id_table = fbnic_pci_tbl,
.probe = fbnic_probe,
.remove = fbnic_remove,
.driver.pm = &fbnic_pm_ops,
.shutdown = fbnic_shutdown,
.err_handler = &fbnic_err_handler,
};
/**
* fbnic_init_module - Driver Registration Routine
*
* The first routine called when the driver is loaded. All it does is
* register with the PCI subsystem.
*
* Return: 0 on success, negative on failure
**/
static int __init fbnic_init_module(void)
{
int err;
fbnic_dbg_init();
err = pci_register_driver(&fbnic_driver);
if (err) {
fbnic_dbg_exit();
goto out;
}
pr_info(DRV_SUMMARY " (%s)", fbnic_driver.name);
out:
return err;
}
module_init(fbnic_init_module);
/**
* fbnic_exit_module - Driver Exit Cleanup Routine
*
* Called just before the driver is removed from memory.
**/
static void __exit fbnic_exit_module(void)
{
pci_unregister_driver(&fbnic_driver);
fbnic_dbg_exit();
}
module_exit(fbnic_exit_module);
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/pci.h`, `linux/rtnetlink.h`, `linux/types.h`, `net/devlink.h`, `fbnic.h`, `fbnic_drvinfo.h`.
- Detected declarations: `function fbnic_rd32`, `function fbnic_fw_present`, `function fbnic_fw_wr32`, `function fbnic_fw_rd32`, `function fbnic_service_task_start`, `function fbnic_service_task_stop`, `function fbnic_up`, `function fbnic_down_noidle`, `function fbnic_down`, `function fbnic_fw_config_after_crash`.
- 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.