drivers/dma/switchtec_dma.c
Source file repositories/reference/linux-study-clean/drivers/dma/switchtec_dma.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/dma/switchtec_dma.c- Extension
.c- Size
- 37869 bytes
- Lines
- 1438
- Domain
- Driver Families
- Bucket
- drivers/dma
- 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/dmaengine.hlinux/module.hlinux/pci.hlinux/delay.hlinux/iopoll.hdmaengine.h
Detected Declarations
struct chan_hw_regsstruct chan_fw_regsstruct switchtec_dma_chanstruct switchtec_dma_devstruct switchtec_dma_hw_se_descstruct switchtec_dma_hw_cestruct switchtec_dma_descenum chan_openum switchtec_dma_opcodefunction wait_for_chan_statusfunction halt_channelfunction unhalt_channelfunction flush_pci_writefunction reset_channelfunction pause_reset_channelfunction channel_opfunction enable_channelfunction disable_channelfunction switchtec_dma_cleanup_completedfunction switchtec_dma_abort_descfunction switchtec_dma_chan_stopfunction switchtec_dma_terminate_allfunction switchtec_dma_synchronizefunction switchtec_dma_prep_descfunction switchtec_dma_prep_memcpyfunction switchtec_dma_tx_submitfunction switchtec_dma_tx_statusfunction switchtec_dma_issue_pendingfunction switchtec_dma_pausefunction switchtec_dma_resumefunction switchtec_dma_desc_taskfunction switchtec_dma_isrfunction switchtec_dma_chan_status_isrfunction list_for_each_entryfunction switchtec_dma_free_descfunction switchtec_dma_alloc_descfunction switchtec_dma_alloc_chan_resourcesfunction switchtec_dma_free_chan_resourcesfunction switchtec_dma_chan_initfunction switchtec_dma_chan_freefunction switchtec_dma_chans_releasefunction switchtec_dma_chans_enumeratefunction switchtec_dma_releasefunction switchtec_dma_createfunction switchtec_dma_probefunction switchtec_dma_remove
Annotated Snippet
static struct pci_driver switchtec_dma_pci_driver = {
.name = KBUILD_MODNAME,
.id_table = switchtec_dma_pci_tbl,
.probe = switchtec_dma_probe,
.remove = switchtec_dma_remove,
};
module_pci_driver(switchtec_dma_pci_driver);
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/circ_buf.h`, `linux/dmaengine.h`, `linux/module.h`, `linux/pci.h`, `linux/delay.h`, `linux/iopoll.h`, `dmaengine.h`.
- Detected declarations: `struct chan_hw_regs`, `struct chan_fw_regs`, `struct switchtec_dma_chan`, `struct switchtec_dma_dev`, `struct switchtec_dma_hw_se_desc`, `struct switchtec_dma_hw_ce`, `struct switchtec_dma_desc`, `enum chan_op`, `enum switchtec_dma_opcode`, `function wait_for_chan_status`.
- Atlas domain: Driver Families / drivers/dma.
- 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.