drivers/scsi/vmw_pvscsi.c
Source file repositories/reference/linux-study-clean/drivers/scsi/vmw_pvscsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/vmw_pvscsi.c- Extension
.c- Size
- 44242 bytes
- Lines
- 1622
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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.
- 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/kernel.hlinux/module.hlinux/interrupt.hlinux/slab.hlinux/workqueue.hlinux/pci.hscsi/scsi.hscsi/scsi_host.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_tcq.hvmw_pvscsi.h
Detected Declarations
struct pvscsi_sg_liststruct pvscsi_ctxstruct pvscsi_adapterfunction pvscsi_devfunction pvscsi_find_contextfunction pvscsi_acquire_contextfunction pvscsi_release_contextfunction pvscsi_map_contextfunction pvscsi_get_contextfunction pvscsi_reg_writefunction pvscsi_reg_readfunction pvscsi_read_intr_statusfunction pvscsi_write_intr_statusfunction pvscsi_unmask_intrfunction pvscsi_mask_intrfunction pvscsi_write_cmd_descfunction pvscsi_abort_cmdfunction pvscsi_kick_rw_iofunction pvscsi_process_request_ringfunction scsi_is_rwfunction pvscsi_kick_iofunction ll_adapter_resetfunction ll_bus_resetfunction ll_device_resetfunction pvscsi_create_sgfunction pvscsi_map_buffersfunction pvscsi_patch_sensefunction pvscsi_unmap_buffersfunction pvscsi_allocate_ringsfunction pvscsi_setup_all_ringsfunction pvscsi_change_queue_depthfunction pvscsi_complete_requestfunction pvscsi_process_completion_ringfunction pvscsi_queue_ringfunction pvscsi_queue_lckfunction DEF_SCSI_QCMDfunction pvscsi_reset_allfunction pvscsi_host_resetfunction pvscsi_bus_resetfunction pvscsi_device_resetfunction pvscsi_process_msgfunction pvscsi_msg_pendingfunction pvscsi_process_msg_ringfunction pvscsi_msg_workqueue_handlerfunction pvscsi_setup_msg_workqueuefunction pvscsi_setup_req_thresholdfunction pvscsi_isrfunction pvscsi_shared_isr
Annotated Snippet
static struct pci_driver pvscsi_pci_driver = {
.name = "vmw_pvscsi",
.id_table = pvscsi_pci_tbl,
.probe = pvscsi_probe,
.remove = pvscsi_remove,
.shutdown = pvscsi_shutdown,
};
static int __init pvscsi_init(void)
{
pr_info("%s - version %s\n",
PVSCSI_LINUX_DRIVER_DESC, PVSCSI_DRIVER_VERSION_STRING);
return pci_register_driver(&pvscsi_pci_driver);
}
static void __exit pvscsi_exit(void)
{
pci_unregister_driver(&pvscsi_pci_driver);
}
module_init(pvscsi_init);
module_exit(pvscsi_exit);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/interrupt.h`, `linux/slab.h`, `linux/workqueue.h`, `linux/pci.h`, `scsi/scsi.h`, `scsi/scsi_host.h`.
- Detected declarations: `struct pvscsi_sg_list`, `struct pvscsi_ctx`, `struct pvscsi_adapter`, `function pvscsi_dev`, `function pvscsi_find_context`, `function pvscsi_acquire_context`, `function pvscsi_release_context`, `function pvscsi_map_context`, `function pvscsi_get_context`, `function pvscsi_reg_write`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: pattern 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.