drivers/net/ethernet/marvell/prestera/prestera_pci.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/marvell/prestera/prestera_pci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/marvell/prestera/prestera_pci.c- Extension
.c- Size
- 24942 bytes
- Lines
- 980
- 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.
- 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/bitfield.hlinux/circ_buf.hlinux/device.hlinux/firmware.hlinux/iopoll.hlinux/kernel.hlinux/module.hlinux/pci.hprestera.h
Detected Declarations
struct prestera_fw_headerstruct prestera_ldr_regsstruct prestera_fw_evtq_regsstruct prestera_fw_cmdq_regsstruct prestera_fw_regsstruct prestera_fw_evtqstruct prestera_fw_cmdqstruct prestera_fwenum prestera_pci_bar_tfunction prestera_fw_writefunction prestera_fw_readfunction prestera_fw_evtq_lenfunction prestera_fw_evtq_availfunction prestera_fw_evtq_rd_setfunction prestera_fw_evtq_read32function prestera_fw_evtq_read_buffunction prestera_fw_evtq_pickfunction prestera_fw_evt_ctl_status_setfunction prestera_fw_evt_work_fnfunction prestera_fw_wait_reg32function prestera_fw_cmdq_lockfunction prestera_fw_cmdq_unlockfunction prestera_fw_cmdq_lenfunction prestera_fw_cmd_sendfunction prestera_fw_send_reqfunction prestera_fw_initfunction prestera_fw_uninitfunction prestera_pci_irq_handlerfunction prestera_ldr_writefunction prestera_ldr_readfunction prestera_ldr_wait_reg32function prestera_ldr_wait_buffunction prestera_ldr_wait_dl_finishfunction prestera_ldr_wr_idx_movefunction prestera_ldr_wr_idx_commitfunction prestera_ldr_sendfunction prestera_ldr_fw_sendfunction prestera_fw_rev_parsefunction prestera_fw_rev_checkfunction prestera_fw_hdr_parsefunction prestera_fw_getfunction prestera_fw_putfunction prestera_fw_loadfunction prestera_pci_pp_use_bar2function prestera_pci_pp_bar2_offsfunction prestera_pci_fw_bar2_offsfunction prestera_pci_probefunction prestera_pci_remove
Annotated Snippet
static struct pci_driver prestera_pci_driver = {
.name = "Prestera DX",
.id_table = prestera_pci_devices,
.probe = prestera_pci_probe,
.remove = prestera_pci_remove,
};
module_pci_driver(prestera_pci_driver);
MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION("Marvell Prestera switch PCI interface");
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/circ_buf.h`, `linux/device.h`, `linux/firmware.h`, `linux/iopoll.h`, `linux/kernel.h`, `linux/module.h`, `linux/pci.h`.
- Detected declarations: `struct prestera_fw_header`, `struct prestera_ldr_regs`, `struct prestera_fw_evtq_regs`, `struct prestera_fw_cmdq_regs`, `struct prestera_fw_regs`, `struct prestera_fw_evtq`, `struct prestera_fw_cmdq`, `struct prestera_fw`, `enum prestera_pci_bar_t`, `function prestera_fw_write`.
- 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.
- 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.