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.
27 #pragma GCC system_header
37 #if defined(_STORPORT_)
38 #define STORPORTAPI DECLSPEC_EXPORT
40 #define STORPORTAPI DECLSPEC_IMPORT
44 typedef PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS
;
46 typedef struct _STOR_SCATTER_GATHER_ELEMENT
{
47 STOR_PHYSICAL_ADDRESS PhysicalAddress
;
50 } STOR_SCATTER_GATHER_ELEMENT
, *PSTOR_SCATTER_GATHER_ELEMENT
;
52 typedef struct _STOR_SCATTER_GATHER_LIST
{
53 ULONG NumberOfElements
;
55 STOR_SCATTER_GATHER_ELEMENT List
[0];
56 } STOR_SCATTER_GATHER_LIST
, *PSTOR_SCATTER_GATHER_LIST
;
58 typedef struct _SCSI_WMI_REQUEST_BLOCK
{
70 ULONG DataTransferLength
;
75 PVOID OriginalRequest
;
79 } SCSI_WMI_REQUEST_BLOCK
, *PSCSI_WMI_REQUEST_BLOCK
;
88 IN PHW_INITIALIZATION_DATA HwInitializationData
,
94 StorPortFreeDeviceBase(
95 IN PVOID HwDeviceExtension
,
96 IN PVOID MappedAddress
);
102 IN PVOID DeviceExtension
,
103 IN ULONG BusDataType
,
104 IN ULONG SystemIoBusNumber
,
112 StorPortSetBusDataByOffset(
113 IN PVOID DeviceExtension
,
114 IN ULONG BusDataType
,
115 IN ULONG SystemIoBusNumber
,
124 StorPortGetDeviceBase(
125 IN PVOID HwDeviceExtension
,
126 IN INTERFACE_TYPE BusType
,
127 IN ULONG SystemIoBusNumber
,
128 IN SCSI_PHYSICAL_ADDRESS IoAddress
,
129 IN ULONG NumberOfBytes
,
130 IN BOOLEAN InIoSpace
);
135 StorPortGetLogicalUnit(
136 IN PVOID HwDeviceExtension
,
145 IN PVOID DeviceExtension
,
152 STOR_PHYSICAL_ADDRESS
154 StorPortGetPhysicalAddress(
155 IN PVOID HwDeviceExtension
,
156 IN PSCSI_REQUEST_BLOCK Srb
,
157 IN PVOID VirtualAddress
,
163 StorPortGetVirtualAddress(
164 IN PVOID HwDeviceExtension
,
165 IN STOR_PHYSICAL_ADDRESS PhysicalAddress
);
170 StorPortGetUncachedExtension(
171 IN PVOID HwDeviceExtension
,
172 IN PPORT_CONFIGURATION_INFORMATION ConfigInfo
,
173 IN ULONG NumberOfBytes
);
178 StorPortNotification(
179 IN SCSI_NOTIFICATION_TYPE NotificationType
,
180 IN PVOID HwDeviceExtension
,
187 IN PVOID HwDeviceExtension
,
188 IN PSCSI_REQUEST_BLOCK Srb OPTIONAL
,
198 StorPortCompleteRequest(
199 IN PVOID HwDeviceExtension
,
209 IN PVOID WriteBuffer
,
216 StorPortStallExecution(
220 STOR_PHYSICAL_ADDRESS
222 StorPortConvertUlong64ToPhysicalAddress(
223 IN ULONG64 UlongAddress
);
228 StorPortConvertPhysicalAddressToUlong64(
229 IN STOR_PHYSICAL_ADDRESS Address
);
234 StorPortValidateRange(
235 IN PVOID HwDeviceExtension
,
236 IN INTERFACE_TYPE BusType
,
237 IN ULONG SystemIoBusNumber
,
238 IN STOR_PHYSICAL_ADDRESS IoAddress
,
239 IN ULONG NumberOfBytes
,
240 IN BOOLEAN InIoSpace
);
246 IN ULONG DebugPrintLevel
,
247 IN PCCHAR DebugMessage
,
253 StorPortReadPortUchar(
259 StorPortReadPortUlong(
265 StorPortReadPortUshort(
271 StorPortReadRegisterUchar(
277 StorPortReadRegisterUlong(
283 StorPortReadRegisterUshort(
284 IN PUSHORT Register
);
289 StorPortWritePortUchar(
296 StorPortWritePortUlong(
303 StorPortWritePortUshort(
310 StorPortWriteRegisterUchar(
317 StorPortWriteRegisterUlong(
324 StorPortWriteRegisterUshort(
332 IN PVOID HwDeviceExtension
,
341 StorPortResumeDevice(
342 IN PVOID HwDeviceExtension
,
351 IN PVOID HwDeviceExtension
,
358 IN PVOID HwDeviceExtension
);
364 IN PVOID HwDeviceExtension
,
368 IN ULONG RequestsToComplete
);
374 IN PVOID HwDeviceExtension
,
383 IN PVOID HwDeviceExtension
,
384 IN ULONG RequestsToComplete
);
390 IN PVOID HwDeviceExtension
);
393 PSTOR_SCATTER_GATHER_LIST
395 StorPortGetScatterGatherList(
396 IN PVOID DeviceExtension
,
397 IN PSCSI_REQUEST_BLOCK Srb
);
399 typedef BOOLEAN DDKAPI
400 (*PSTOR_SYNCHRONIZED_ACCESS
)(
401 IN PVOID HwDeviceExtension
,
407 StorPortSynchronizeAccess(
408 IN PVOID HwDeviceExtension
,
409 IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine
,
413 #define DebugPrint(x) StorPortDebugPrint x
415 #define DebugPrint(x)
422 #endif /* __STORPORT_H */