18#define PCI_VENDOR_ID_VMWARE (0x15ad)
19#define PCI_DEVICE_ID_VMWARE_PVSCSI (0x07c0)
25#define PVSCSI_CDB_MAX_SIZE (16)
28 PvScsiRegOffsetCommand = 0x0,
29 PvScsiRegOffsetCommandData = 0x4,
30 PvScsiRegOffsetCommandStatus = 0x8,
31 PvScsiRegOffsetLastSts0 = 0x100,
32 PvScsiRegOffsetLastSts1 = 0x104,
33 PvScsiRegOffsetLastSts2 = 0x108,
34 PvScsiRegOffsetLastSts3 = 0x10c,
35 PvScsiRegOffsetIntrStatus = 0x100c,
36 PvScsiRegOffsetIntrMask = 0x2010,
37 PvScsiRegOffsetKickNonRwIo = 0x3014,
38 PvScsiRegOffsetDebug = 0x3018,
39 PvScsiRegOffsetKickRwIo = 0x4018,
45#define PVSCSI_INTR_CMPL_0 BIT0
46#define PVSCSI_INTR_CMPL_1 BIT1
47#define PVSCSI_INTR_CMPL_MASK (PVSCSI_INTR_CMPL_0 | PVSCSI_INTR_CMPL_1)
51 PvScsiCmdAdapterReset = 1,
52 PvScsiCmdIssueScsi = 2,
53 PvScsiCmdSetupRings = 3,
54 PvScsiCmdResetBus = 4,
55 PvScsiCmdResetDevice = 5,
56 PvScsiCmdAbortCmd = 6,
58 PvScsiCmdSetupMsgRing = 8,
59 PvScsiCmdDeviceUnplug = 9,
63#define PVSCSI_SETUP_RINGS_MAX_NUM_PAGES (32)
67 UINT32 ReqRingNumPages;
68 UINT32 CmpRingNumPages;
70 UINT64 ReqRingPPNs[PVSCSI_SETUP_RINGS_MAX_NUM_PAGES];
71 UINT64 CmpRingPPNs[PVSCSI_SETUP_RINGS_MAX_NUM_PAGES];
75#define PVSCSI_MAX_CMD_DATA_WORDS \
76 (sizeof (PVSCSI_CMD_DESC_SETUP_RINGS) / sizeof (UINT32))
82 UINT32 ReqNumEntriesLog2;
86 UINT32 CmpNumEntriesLog2;
92 UINT32 MsgNumEntriesLog2;
99#define PVSCSI_SIMPLE_QUEUE_TAG (0x20)
104#define PVSCSI_FLAG_CMD_WITH_SG_LIST BIT0
105#define PVSCSI_FLAG_CMD_OUT_OF_BAND_CDB BIT1
106#define PVSCSI_FLAG_CMD_DIR_NONE BIT2
107#define PVSCSI_FLAG_CMD_DIR_TOHOST BIT3
108#define PVSCSI_FLAG_CMD_DIR_TODEVICE BIT4
133 PvScsiBtStatSuccess = 0x00,
134 PvScsiBtStatLinkedCommandCompleted = 0x0a,
135 PvScsiBtStatLinkedCommandCompletedWithFlag = 0x0b,
136 PvScsiBtStatDataUnderrun = 0x0c,
137 PvScsiBtStatSelTimeout = 0x11,
138 PvScsiBtStatDatarun = 0x12,
139 PvScsiBtStatBusFree = 0x13,
140 PvScsiBtStatInvPhase = 0x14,
144 PvScsiBtStatLunMismatch = 0x17,
148 PvScsiBtStatSensFailed = 0x1b,
149 PvScsiBtStatTagReject = 0x1c,
153 PvScsiBtStatBadMsg = 0x1d,
157 PvScsiBtStatHaHardware = 0x20,
158 PvScsiBtStatNoResponse = 0x21,
162 PvScsiBtStatSentRst = 0x22,
163 PvScsiBtStatRecvRst = 0x23,
164 PvScsiBtStatDisconnect = 0x24,
168 PvScsiBtStatBusReset = 0x25,
169 PvScsiBtStatAbortQueue = 0x26,
170 PvScsiBtStatHaSoftware = 0x27,
171 PvScsiBtStatHaTimeout = 0x30,
172 PvScsiBtStatScsiParity = 0x34,
173} PVSCSI_HOST_BUS_ADAPTER_STATUS;