drivers/usb/core/devices.c
Source file repositories/reference/linux-study-clean/drivers/usb/core/devices.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/core/devices.c- Extension
.c- Size
- 15438 bytes
- Lines
- 546
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fs.hlinux/mm.hlinux/gfp.hlinux/usb.hlinux/usbdevice_fs.hlinux/usb/hcd.hlinux/mutex.hlinux/uaccess.husb.h
Detected Declarations
struct class_infofunction usb_device_dumpfunction usb_device_read
Annotated Snippet
const struct file_operations usbfs_devices_fops = {
.llseek = no_seek_end_llseek,
.read = usb_device_read,
};
Annotation
- Immediate include surface: `linux/fs.h`, `linux/mm.h`, `linux/gfp.h`, `linux/usb.h`, `linux/usbdevice_fs.h`, `linux/usb/hcd.h`, `linux/mutex.h`, `linux/uaccess.h`.
- Detected declarations: `struct class_info`, `function usb_device_dump`, `function usb_device_read`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.