drivers/scsi/scsi.c
Source file repositories/reference/linux-study-clean/drivers/scsi/scsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/scsi.c- Extension
.c- Size
- 29538 bytes
- Lines
- 1079
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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/module.hlinux/moduleparam.hlinux/kernel.hlinux/timer.hlinux/string.hlinux/slab.hlinux/blkdev.hlinux/delay.hlinux/init.hlinux/completion.hlinux/unistd.hlinux/spinlock.hlinux/kmod.hlinux/interrupt.hlinux/notifier.hlinux/cpu.hlinux/mutex.hlinux/unaligned.hscsi/scsi.hscsi/scsi_cmnd.hscsi/scsi_dbg.hscsi/scsi_device.hscsi/scsi_driver.hscsi/scsi_eh.hscsi/scsi_host.hscsi/scsi_tcq.hscsi_priv.hscsi_logging.htrace/events/scsi.h
Detected Declarations
enum scsi_vpd_parametersfunction scsi_log_sendfunction scsi_log_completionfunction scsi_finish_commandfunction scsi_device_max_queue_depthfunction scsi_change_queue_depthfunction scsi_track_queue_fullfunction scsi_vpd_inquiryfunction scsi_get_vpd_sizefunction documentfunction scsi_update_vpd_pagefunction scsi_attach_vpdfunction scsi_report_opcodefunction scsi_cdl_check_cmdfunction scsi_cdl_checkfunction scsi_cdl_enablefunction scsi_device_getfunction scsi_device_putfunction starget_for_each_devicefunction shost_for_each_devicefunction __starget_for_each_devicefunction __shost_for_each_devicefunction list_for_each_entryfunction list_for_each_entryfunction init_scsifunction exit_scsimodule init init_scsiexport scsi_logging_levelexport scsi_change_queue_depthexport scsi_track_queue_fullexport scsi_get_vpd_pageexport scsi_report_opcodeexport scsi_device_getexport scsi_device_putexport __scsi_iterate_devicesexport starget_for_each_deviceexport __starget_for_each_deviceexport __scsi_device_lookup_by_targetexport scsi_device_lookup_by_targetexport __scsi_device_lookupexport scsi_device_lookup
Annotated Snippet
subsys_initcall(init_scsi);
module_exit(exit_scsi);
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/timer.h`, `linux/string.h`, `linux/slab.h`, `linux/blkdev.h`, `linux/delay.h`.
- Detected declarations: `enum scsi_vpd_parameters`, `function scsi_log_send`, `function scsi_log_completion`, `function scsi_finish_command`, `function scsi_device_max_queue_depth`, `function scsi_change_queue_depth`, `function scsi_track_queue_full`, `function scsi_vpd_inquiry`, `function scsi_get_vpd_size`, `function document`.
- Atlas domain: Driver Families / drivers/scsi.
- 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.