drivers/usb/misc/usbtest.c
Source file repositories/reference/linux-study-clean/drivers/usb/misc/usbtest.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/misc/usbtest.c- Extension
.c- Size
- 80217 bytes
- Lines
- 3080
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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.
- 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/errno.hlinux/init.hlinux/slab.hlinux/mm.hlinux/module.hlinux/moduleparam.hlinux/scatterlist.hlinux/mutex.hlinux/timer.hlinux/usb.h
Detected Declarations
struct usbtest_param_32struct usbtest_param_64struct usbtest_infostruct usbtest_devstruct sg_timeoutstruct ctrl_ctxstruct subcasestruct queued_ctxstruct transfer_contextfunction endpoint_updatefunction get_endpointsfunction simple_callbackfunction get_maxpacketfunction ss_isoc_get_packet_numfunction simple_fill_buffunction buffer_offsetfunction check_guard_bytesfunction simple_check_buffunction simple_free_urbfunction simple_iofunction free_sglistfunction alloc_sglistfunction sg_timeoutfunction perform_sglistfunction get_altsettingfunction set_altsettingfunction is_good_configfunction is_good_extfunction is_good_ss_capfunction is_good_con_idfunction ch9_postconfigfunction rightfunction ctrl_completefunction usb_unlink_urbfunction test_ctrl_queuefunction unlink1_callbackfunction unlink1function unlink_simplefunction unlink_queued_callbackfunction unlink_queuedfunction verify_not_haltedfunction verify_haltedfunction test_haltfunction test_toggle_syncfunction halt_simplefunction toggle_sync_simplefunction ctrl_outfunction complicated_callback
Annotated Snippet
module_init(usbtest_init);
static void __exit usbtest_exit(void)
{
usb_deregister(&usbtest_driver);
}
module_exit(usbtest_exit);
MODULE_DESCRIPTION("USB Core/HCD Testing Driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/init.h`, `linux/slab.h`, `linux/mm.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/scatterlist.h`.
- Detected declarations: `struct usbtest_param_32`, `struct usbtest_param_64`, `struct usbtest_info`, `struct usbtest_dev`, `struct sg_timeout`, `struct ctrl_ctx`, `struct subcase`, `struct queued_ctx`, `struct transfer_context`, `function endpoint_update`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration 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.