drivers/usb/storage/uas.c
Source file repositories/reference/linux-study-clean/drivers/usb/storage/uas.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/storage/uas.c- Extension
.c- Size
- 34851 bytes
- Lines
- 1305
- 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/blkdev.hlinux/slab.hlinux/types.hlinux/module.hlinux/usb.hlinux/usb_usual.hlinux/usb/hcd.hlinux/usb/storage.hlinux/usb/uas.hscsi/scsi.hscsi/scsi_eh.hscsi/scsi_dbg.hscsi/scsi_devinfo.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_host.hscsi/scsi_tcq.huas-detect.hscsiglue.hunusual_uas.h
Detected Declarations
struct uas_dev_infostruct uas_cmd_infofunction uas_do_workfunction uas_scan_workfunction uas_add_workfunction uas_zap_pendingfunction uas_sensefunction uas_log_cmd_statefunction uas_free_unsubmitted_urbsfunction uas_try_completefunction uas_xfer_datafunction uas_evaluate_response_iufunction uas_stat_cmpltfunction uas_data_cmpltfunction uas_cmd_cmpltfunction uas_submit_sense_urbfunction uas_submit_urbsfunction uas_queuecommand_lckfunction DEF_SCSI_QCMDfunction uas_eh_host_reset_handlerfunction uas_target_allocfunction uas_sdev_initfunction uas_sdev_configurefunction uas_switch_interfacefunction uas_configure_endpointsfunction uas_free_streamsfunction uas_probefunction uas_cmnd_list_emptyfunction uas_wait_for_pending_cmndsfunction uas_pre_resetfunction uas_post_resetfunction uas_suspendfunction uas_resumefunction uas_reset_resumefunction uas_disconnectfunction uas_shutdownfunction uas_initfunction uas_exitmodule init uas_init
Annotated Snippet
module_init(uas_init);
module_exit(uas_exit);
MODULE_DESCRIPTION("USB Attached SCSI driver");
MODULE_LICENSE("GPL");
MODULE_IMPORT_NS("USB_STORAGE");
MODULE_AUTHOR(
"Hans de Goede <hdegoede@redhat.com>, Matthew Wilcox and Sarah Sharp");
Annotation
- Immediate include surface: `linux/blkdev.h`, `linux/slab.h`, `linux/types.h`, `linux/module.h`, `linux/usb.h`, `linux/usb_usual.h`, `linux/usb/hcd.h`, `linux/usb/storage.h`.
- Detected declarations: `struct uas_dev_info`, `struct uas_cmd_info`, `function uas_do_work`, `function uas_scan_work`, `function uas_add_work`, `function uas_zap_pending`, `function uas_sense`, `function uas_log_cmd_state`, `function uas_free_unsubmitted_urbs`, `function uas_try_complete`.
- 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.