drivers/thunderbolt/dma_test.c
Source file repositories/reference/linux-study-clean/drivers/thunderbolt/dma_test.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/thunderbolt/dma_test.c- Extension
.c- Size
- 19276 bytes
- Lines
- 761
- Domain
- Driver Families
- Bucket
- drivers/thunderbolt
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/completion.hlinux/debugfs.hlinux/module.hlinux/sizes.hlinux/thunderbolt.h
Detected Declarations
struct dma_test_framestruct dma_testenum dma_test_frame_pdfenum dma_test_test_errorenum dma_test_resultfunction dma_test_free_ringsfunction dma_test_start_ringsfunction dma_test_stop_ringsfunction dma_test_rx_callbackfunction dma_test_submit_rxfunction dma_test_tx_callbackfunction dma_test_submit_txfunction lanes_getfunction lanes_validatefunction lanes_setfunction speed_getfunction speed_validatefunction speed_setfunction packets_to_receive_getfunction packets_to_receive_validatefunction packets_to_receive_setfunction packets_to_send_getfunction packets_to_send_validatefunction packets_to_send_setfunction dma_test_set_bondingfunction dma_test_validate_configfunction dma_test_check_errorsfunction test_storefunction status_showfunction dma_test_debugfs_initfunction dma_test_probefunction dma_test_removefunction dma_test_suspendfunction dma_test_resumefunction dma_test_initfunction dma_test_exitmodule init dma_test_init
Annotated Snippet
module_init(dma_test_init);
static void __exit dma_test_exit(void)
{
tb_unregister_service_driver(&dma_test_driver);
tb_unregister_property_dir("dma_test", dma_test_dir);
tb_property_free_dir(dma_test_dir);
kfree(dma_test_pattern);
}
module_exit(dma_test_exit);
MODULE_AUTHOR("Isaac Hazan <isaac.hazan@intel.com>");
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
MODULE_DESCRIPTION("Thunderbolt/USB4 DMA traffic test driver");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/completion.h`, `linux/debugfs.h`, `linux/module.h`, `linux/sizes.h`, `linux/thunderbolt.h`.
- Detected declarations: `struct dma_test_frame`, `struct dma_test`, `enum dma_test_frame_pdf`, `enum dma_test_test_error`, `enum dma_test_result`, `function dma_test_free_rings`, `function dma_test_start_rings`, `function dma_test_stop_rings`, `function dma_test_rx_callback`, `function dma_test_submit_rx`.
- Atlas domain: Driver Families / drivers/thunderbolt.
- Implementation status: integration 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.