drivers/net/ethernet/amd/pds_core/main.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/amd/pds_core/main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/amd/pds_core/main.c- Extension
.c- Size
- 14026 bytes
- Lines
- 609
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/pci.hlinux/pds/pds_common.hcore.h
Detected Declarations
function pdsc_wdtimer_cbfunction pdsc_unmap_barsfunction pdsc_map_barsfunction pdsc_sriov_configurefunction pdsc_init_vffunction pdsc_init_pffunction pdsc_probefunction pdsc_removefunction pdsc_stop_health_threadfunction pdsc_restart_health_threadfunction pdsc_reset_preparefunction pdsc_reset_donefunction pdsc_pci_error_detectedfunction pdsc_pci_error_resumefunction pdsc_init_modulefunction pdsc_cleanup_modulemodule init pdsc_init_moduleexport pdsc_get_pf_struct
Annotated Snippet
static struct pci_driver pdsc_driver = {
.name = PDS_CORE_DRV_NAME,
.id_table = pdsc_id_table,
.probe = pdsc_probe,
.remove = pdsc_remove,
.sriov_configure = pdsc_sriov_configure,
.err_handler = &pdsc_err_handler,
};
void *pdsc_get_pf_struct(struct pci_dev *vf_pdev)
{
return pci_iov_get_pf_drvdata(vf_pdev, &pdsc_driver);
}
EXPORT_SYMBOL_GPL(pdsc_get_pf_struct);
static int __init pdsc_init_module(void)
{
if (strcmp(KBUILD_MODNAME, PDS_CORE_DRV_NAME))
return -EINVAL;
pdsc_debugfs_create();
return pci_register_driver(&pdsc_driver);
}
static void __exit pdsc_cleanup_module(void)
{
pci_unregister_driver(&pdsc_driver);
pdsc_debugfs_destroy();
}
module_init(pdsc_init_module);
module_exit(pdsc_cleanup_module);
Annotation
- Immediate include surface: `linux/pci.h`, `linux/pds/pds_common.h`, `core.h`.
- Detected declarations: `function pdsc_wdtimer_cb`, `function pdsc_unmap_bars`, `function pdsc_map_bars`, `function pdsc_sriov_configure`, `function pdsc_init_vf`, `function pdsc_init_pf`, `function pdsc_probe`, `function pdsc_remove`, `function pdsc_stop_health_thread`, `function pdsc_restart_health_thread`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.