drivers/net/can/peak_canfd/peak_pciefd_main.c
Source file repositories/reference/linux-study-clean/drivers/net/can/peak_canfd/peak_pciefd_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/can/peak_canfd/peak_pciefd_main.c- Extension
.c- Size
- 25221 bytes
- Lines
- 867
- 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/kernel.hlinux/module.hlinux/interrupt.hlinux/netdevice.hlinux/delay.hlinux/pci.hlinux/io.hlinux/can.hlinux/can/dev.hpeak_canfd_user.h
Detected Declarations
struct pciefd_rx_dmastruct pciefd_tx_linkstruct pciefd_pagestruct pciefd_boardstruct pciefd_canstruct pciefd_boardfunction pciefd_irq_tagfunction pciefd_irq_rx_cntfunction pciefd_irq_is_lnkfunction pciefd_sys_readregfunction pciefd_sys_writeregfunction pciefd_can_readregfunction pciefd_can_writeregfunction pciefd_can_setup_rx_dmafunction pciefd_can_clear_rx_dmafunction pciefd_can_setup_tx_dmafunction pciefd_can_clear_tx_dmafunction pciefd_can_ack_rx_dmafunction pciefd_irq_handlerfunction pciefd_enable_tx_pathfunction pciefd_pre_cmdfunction pciefd_write_cmdfunction pciefd_post_cmdfunction pciefd_write_tx_msgfunction pciefd_can_probefunction pciefd_can_removefunction pciefd_can_remove_allfunction peak_pciefd_probefunction PCIEFD_FW_VERSIONfunction peak_pciefd_remove
Annotated Snippet
static struct pci_driver peak_pciefd_driver = {
.name = PCIEFD_DRV_NAME,
.id_table = peak_pciefd_tbl,
.probe = peak_pciefd_probe,
.remove = peak_pciefd_remove,
};
module_pci_driver(peak_pciefd_driver);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/interrupt.h`, `linux/netdevice.h`, `linux/delay.h`, `linux/pci.h`, `linux/io.h`, `linux/can.h`.
- Detected declarations: `struct pciefd_rx_dma`, `struct pciefd_tx_link`, `struct pciefd_page`, `struct pciefd_board`, `struct pciefd_can`, `struct pciefd_board`, `function pciefd_irq_tag`, `function pciefd_irq_rx_cnt`, `function pciefd_irq_is_lnk`, `function pciefd_sys_readreg`.
- 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.