6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32 #if defined(_STORPORT_)
35 #define STORPORTAPI DECLSPEC_IMPORT
38 typedef PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS
;
40 typedef struct _STOR_SCATTER_GATHER_ELEMENT
{
41 STOR_PHYSICAL_ADDRESS PhysicalAddress
;
44 } STOR_SCATTER_GATHER_ELEMENT
, *PSTOR_SCATTER_GATHER_ELEMENT
;
46 typedef struct _STOR_SCATTER_GATHER_LIST
{
47 ULONG NumberOfElements
;
49 STOR_SCATTER_GATHER_ELEMENT List
[0];
50 } STOR_SCATTER_GATHER_LIST
, *PSTOR_SCATTER_GATHER_LIST
;
52 typedef struct _SCSI_WMI_REQUEST_BLOCK
{
64 ULONG DataTransferLength
;
69 PVOID OriginalRequest
;
73 } SCSI_WMI_REQUEST_BLOCK
, *PSCSI_WMI_REQUEST_BLOCK
;
81 _In_ PHW_INITIALIZATION_DATA HwInitializationData
,
82 _In_opt_ PVOID Unused
);
87 StorPortFreeDeviceBase(
88 _In_ PVOID HwDeviceExtension
,
89 _In_ PVOID MappedAddress
);
95 _In_ PVOID DeviceExtension
,
96 _In_ ULONG BusDataType
,
97 _In_ ULONG SystemIoBusNumber
,
98 _In_ ULONG SlotNumber
,
99 _Out_
_When_(Length
!= 0, _Out_writes_bytes_(Length
)) PVOID Buffer
,
105 StorPortSetBusDataByOffset(
106 _In_ PVOID DeviceExtension
,
107 _In_ ULONG BusDataType
,
108 _In_ ULONG SystemIoBusNumber
,
109 _In_ ULONG SlotNumber
,
110 _In_reads_bytes_(Length
) PVOID Buffer
,
117 StorPortGetDeviceBase(
118 _In_ PVOID HwDeviceExtension
,
119 _In_ INTERFACE_TYPE BusType
,
120 _In_ ULONG SystemIoBusNumber
,
121 _In_ SCSI_PHYSICAL_ADDRESS IoAddress
,
122 _In_ ULONG NumberOfBytes
,
123 _In_ BOOLEAN InIoSpace
);
128 StorPortGetLogicalUnit(
129 _In_ PVOID HwDeviceExtension
,
138 _In_ PVOID DeviceExtension
,
145 STOR_PHYSICAL_ADDRESS
147 StorPortGetPhysicalAddress(
148 _In_ PVOID HwDeviceExtension
,
149 _In_opt_ PSCSI_REQUEST_BLOCK Srb
,
150 _In_ PVOID VirtualAddress
,
151 _Out_ ULONG
*Length
);
156 StorPortGetVirtualAddress(
157 _In_ PVOID HwDeviceExtension
,
158 _In_ STOR_PHYSICAL_ADDRESS PhysicalAddress
);
163 StorPortGetUncachedExtension(
164 _In_ PVOID HwDeviceExtension
,
165 _In_ PPORT_CONFIGURATION_INFORMATION ConfigInfo
,
166 _In_ ULONG NumberOfBytes
);
171 StorPortNotification(
172 _In_ SCSI_NOTIFICATION_TYPE NotificationType
,
173 _In_ PVOID HwDeviceExtension
,
180 _In_ PVOID HwDeviceExtension
,
181 _In_opt_ PSCSI_REQUEST_BLOCK Srb
,
185 _In_ ULONG ErrorCode
,
186 _In_ ULONG UniqueId
);
191 StorPortCompleteRequest(
192 _In_ PVOID HwDeviceExtension
,
196 _In_ UCHAR SrbStatus
);
202 _Out_writes_bytes_(Length
) PVOID WriteBuffer
,
203 _In_reads_bytes_(Length
) PVOID ReadBuffer
,
209 StorPortStallExecution(
213 STOR_PHYSICAL_ADDRESS
215 StorPortConvertUlong64ToPhysicalAddress(
216 _In_ ULONG64 UlongAddress
);
221 StorPortConvertPhysicalAddressToUlong64(
222 _In_ STOR_PHYSICAL_ADDRESS Address
);
227 StorPortValidateRange(
228 _In_ PVOID HwDeviceExtension
,
229 _In_ INTERFACE_TYPE BusType
,
230 _In_ ULONG SystemIoBusNumber
,
231 _In_ STOR_PHYSICAL_ADDRESS IoAddress
,
232 _In_ ULONG NumberOfBytes
,
233 _In_ BOOLEAN InIoSpace
);
239 _In_ ULONG DebugPrintLevel
,
240 _In_ PCCHAR DebugMessage
,
246 StorPortReadPortUchar(
247 _In_ PVOID HwDeviceExtension
,
253 StorPortReadPortUlong(
254 _In_ PVOID HwDeviceExtension
,
260 StorPortReadPortUshort(
261 _In_ PVOID HwDeviceExtension
,
267 StorPortReadRegisterUchar(
268 _In_ PVOID HwDeviceExtension
,
269 _In_ PUCHAR Register
);
274 StorPortReadRegisterUlong(
275 _In_ PVOID HwDeviceExtension
,
276 _In_ PULONG Register
);
281 StorPortReadRegisterUshort(
282 _In_ PVOID HwDeviceExtension
,
283 _In_ PUSHORT Register
);
288 StorPortWritePortUchar(
289 _In_ PVOID HwDeviceExtension
,
296 StorPortWritePortUlong(
297 _In_ PVOID HwDeviceExtension
,
304 StorPortWritePortUshort(
305 _In_ PVOID HwDeviceExtension
,
312 StorPortWriteRegisterUchar(
313 _In_ PVOID HwDeviceExtension
,
314 _In_ PUCHAR Register
,
320 StorPortWriteRegisterUlong(
321 _In_ PVOID HwDeviceExtension
,
322 _In_ PULONG Register
,
328 StorPortWriteRegisterUshort(
329 _In_ PVOID HwDeviceExtension
,
330 _In_ PUSHORT Register
,
337 _In_ PVOID HwDeviceExtension
,
346 StorPortResumeDevice(
347 _In_ PVOID HwDeviceExtension
,
356 _In_ PVOID HwDeviceExtension
,
363 _In_ PVOID HwDeviceExtension
);
369 _In_ PVOID HwDeviceExtension
,
373 _In_ ULONG RequestsToComplete
);
379 _In_ PVOID HwDeviceExtension
,
388 _In_ PVOID HwDeviceExtension
,
389 _In_ ULONG RequestsToComplete
);
395 _In_ PVOID HwDeviceExtension
);
398 PSTOR_SCATTER_GATHER_LIST
400 StorPortGetScatterGatherList(
401 _In_ PVOID DeviceExtension
,
402 _In_ PSCSI_REQUEST_BLOCK Srb
);
405 (NTAPI STOR_SYNCHRONIZED_ACCESS
)(
406 _In_ PVOID HwDeviceExtension
,
408 typedef STOR_SYNCHRONIZED_ACCESS
*PSTOR_SYNCHRONIZED_ACCESS
;
413 StorPortSynchronizeAccess(
414 _In_ PVOID HwDeviceExtension
,
415 _In_ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine
,
416 _In_opt_ PVOID Context
);
419 #define DebugPrint(x) StorPortDebugPrint x
421 #define DebugPrint(x)
428 #endif /* __STORPORT_H */