drivers/scsi/vmw_pvscsi.h
Source file repositories/reference/linux-study-clean/drivers/scsi/vmw_pvscsi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/vmw_pvscsi.h- Extension
.h- Size
- 13671 bytes
- Lines
- 462
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.h
Detected Declarations
struct PVSCSICmdDescResetDevicestruct PVSCSICmdDescConfigCmdstruct PVSCSICmdDescSetupReqCallstruct PVSCSICmdDescAbortCmdstruct PVSCSICmdDescSetupRingsstruct PVSCSICmdDescSetupMsgRingstruct PVSCSIRingMsgDescstruct PVSCSIMsgDescDevStatusChangedstruct PVSCSIRingsStatestruct PVSCSIRingReqDescstruct PVSCSISGElementstruct PVSCSIRingCmpDescstruct PVSCSIConfigPageHeaderstruct PVSCSIConfigPageControllerenum HostBusAdapterStatusenum ScsiDeviceStatusenum PVSCSIRegOffsetenum PVSCSICommandsenum PVSCSIConfigPageTypeenum PVSCSIConfigPageAddressTypeenum PVSCSIMsgTypeenum PVSCSIMemSpace
Annotated Snippet
struct PVSCSICmdDescResetDevice {
u32 target;
u8 lun[8];
} __packed;
/*
* Command descriptor for PVSCSI_CMD_CONFIG --
*/
struct PVSCSICmdDescConfigCmd {
u64 cmpAddr;
u64 configPageAddress;
u32 configPageNum;
u32 _pad;
} __packed;
/*
* Command descriptor for PVSCSI_CMD_SETUP_REQCALLTHRESHOLD --
*/
struct PVSCSICmdDescSetupReqCall {
u32 enable;
} __packed;
enum PVSCSIConfigPageType {
PVSCSI_CONFIG_PAGE_CONTROLLER = 0x1958,
PVSCSI_CONFIG_PAGE_PHY = 0x1959,
PVSCSI_CONFIG_PAGE_DEVICE = 0x195a,
};
enum PVSCSIConfigPageAddressType {
PVSCSI_CONFIG_CONTROLLER_ADDRESS = 0x2120,
PVSCSI_CONFIG_BUSTARGET_ADDRESS = 0x2121,
PVSCSI_CONFIG_PHY_ADDRESS = 0x2122,
};
/*
* Command descriptor for PVSCSI_CMD_ABORT_CMD --
*
* - currently does not support specifying the LUN.
* - _pad should be 0.
*/
struct PVSCSICmdDescAbortCmd {
u64 context;
u32 target;
u32 _pad;
} __packed;
/*
* Command descriptor for PVSCSI_CMD_SETUP_RINGS --
*
* Notes:
* - reqRingNumPages and cmpRingNumPages need to be power of two.
* - reqRingNumPages and cmpRingNumPages need to be different from 0,
* - reqRingNumPages and cmpRingNumPages need to be inferior to
* PVSCSI_SETUP_RINGS_MAX_NUM_PAGES.
*/
#define PVSCSI_SETUP_RINGS_MAX_NUM_PAGES 32
struct PVSCSICmdDescSetupRings {
u32 reqRingNumPages;
u32 cmpRingNumPages;
u64 ringsStatePPN;
u64 reqRingPPNs[PVSCSI_SETUP_RINGS_MAX_NUM_PAGES];
u64 cmpRingPPNs[PVSCSI_SETUP_RINGS_MAX_NUM_PAGES];
} __packed;
/*
* Command descriptor for PVSCSI_CMD_SETUP_MSG_RING --
*
* Notes:
* - this command was not supported in the initial revision of the h/w
* interface. Before using it, you need to check that it is supported by
* writing PVSCSI_CMD_SETUP_MSG_RING to the 'command' register, then
* immediately after read the 'command status' register:
* * a value of -1 means that the cmd is NOT supported,
* * a value != -1 means that the cmd IS supported.
* If it's supported the 'command status' register should return:
* sizeof(PVSCSICmdDescSetupMsgRing) / sizeof(u32).
* - this command should be issued _after_ the usual SETUP_RINGS so that the
* RingsState page is already setup. If not, the command is a nop.
* - numPages needs to be a power of two,
* - numPages needs to be different from 0,
* - _pad should be zero.
*/
#define PVSCSI_SETUP_MSG_RING_MAX_NUM_PAGES 16
struct PVSCSICmdDescSetupMsgRing {
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct PVSCSICmdDescResetDevice`, `struct PVSCSICmdDescConfigCmd`, `struct PVSCSICmdDescSetupReqCall`, `struct PVSCSICmdDescAbortCmd`, `struct PVSCSICmdDescSetupRings`, `struct PVSCSICmdDescSetupMsgRing`, `struct PVSCSIRingMsgDesc`, `struct PVSCSIMsgDescDevStatusChanged`, `struct PVSCSIRingsState`, `struct PVSCSIRingReqDesc`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- 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.