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
36 #if defined(_STORPORT_)
37 #define STORPORTAPI DECLSPEC_EXPORT
39 #define STORPORTAPI DECLSPEC_IMPORT
43 typedef PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS
;
45 typedef struct _STOR_SCATTER_GATHER_ELEMENT
{
46 STOR_PHYSICAL_ADDRESS PhysicalAddress
;
49 } STOR_SCATTER_GATHER_ELEMENT
, *PSTOR_SCATTER_GATHER_ELEMENT
;
51 typedef struct _STOR_SCATTER_GATHER_LIST
{
52 ULONG NumberOfElements
;
54 STOR_SCATTER_GATHER_ELEMENT List
[0];
55 } STOR_SCATTER_GATHER_LIST
, *PSTOR_SCATTER_GATHER_LIST
;
57 typedef struct _SCSI_WMI_REQUEST_BLOCK
{
69 ULONG DataTransferLength
;
74 PVOID OriginalRequest
;
78 } SCSI_WMI_REQUEST_BLOCK
, *PSCSI_WMI_REQUEST_BLOCK
;
87 IN PHW_INITIALIZATION_DATA HwInitializationData
,
93 StorPortFreeDeviceBase(
94 IN PVOID HwDeviceExtension
,
95 IN PVOID MappedAddress
);
101 IN PVOID DeviceExtension
,
102 IN ULONG BusDataType
,
103 IN ULONG SystemIoBusNumber
,
111 StorPortSetBusDataByOffset(
112 IN PVOID DeviceExtension
,
113 IN ULONG BusDataType
,
114 IN ULONG SystemIoBusNumber
,
123 StorPortGetDeviceBase(
124 IN PVOID HwDeviceExtension
,
125 IN INTERFACE_TYPE BusType
,
126 IN ULONG SystemIoBusNumber
,
127 IN SCSI_PHYSICAL_ADDRESS IoAddress
,
128 IN ULONG NumberOfBytes
,
129 IN BOOLEAN InIoSpace
);
134 StorPortGetLogicalUnit(
135 IN PVOID HwDeviceExtension
,
144 IN PVOID DeviceExtension
,
151 STOR_PHYSICAL_ADDRESS
153 StorPortGetPhysicalAddress(
154 IN PVOID HwDeviceExtension
,
155 IN PSCSI_REQUEST_BLOCK Srb
,
156 IN PVOID VirtualAddress
,
162 StorPortGetVirtualAddress(
163 IN PVOID HwDeviceExtension
,
164 IN STOR_PHYSICAL_ADDRESS PhysicalAddress
);
169 StorPortGetUncachedExtension(
170 IN PVOID HwDeviceExtension
,
171 IN PPORT_CONFIGURATION_INFORMATION ConfigInfo
,
172 IN ULONG NumberOfBytes
);
177 StorPortNotification(
178 IN SCSI_NOTIFICATION_TYPE NotificationType
,
179 IN PVOID HwDeviceExtension
,
186 IN PVOID HwDeviceExtension
,
187 IN PSCSI_REQUEST_BLOCK Srb OPTIONAL
,
197 StorPortCompleteRequest(
198 IN PVOID HwDeviceExtension
,
208 IN PVOID WriteBuffer
,
215 StorPortStallExecution(
219 STOR_PHYSICAL_ADDRESS
221 StorPortConvertUlong64ToPhysicalAddress(
222 IN ULONG64 UlongAddress
);
227 StorPortConvertPhysicalAddressToUlong64(
228 IN STOR_PHYSICAL_ADDRESS Address
);
233 StorPortValidateRange(
234 IN PVOID HwDeviceExtension
,
235 IN INTERFACE_TYPE BusType
,
236 IN ULONG SystemIoBusNumber
,
237 IN STOR_PHYSICAL_ADDRESS IoAddress
,
238 IN ULONG NumberOfBytes
,
239 IN BOOLEAN InIoSpace
);
245 IN ULONG DebugPrintLevel
,
246 IN PCCHAR DebugMessage
,
252 StorPortReadPortUchar(
258 StorPortReadPortUlong(
264 StorPortReadPortUshort(
270 StorPortReadRegisterUchar(
276 StorPortReadRegisterUlong(
282 StorPortReadRegisterUshort(
283 IN PUSHORT Register
);
288 StorPortWritePortUchar(
295 StorPortWritePortUlong(
302 StorPortWritePortUshort(
309 StorPortWriteRegisterUchar(
316 StorPortWriteRegisterUlong(
323 StorPortWriteRegisterUshort(
331 IN PVOID HwDeviceExtension
,
340 StorPortResumeDevice(
341 IN PVOID HwDeviceExtension
,
350 IN PVOID HwDeviceExtension
,
357 IN PVOID HwDeviceExtension
);
363 IN PVOID HwDeviceExtension
,
367 IN ULONG RequestsToComplete
);
373 IN PVOID HwDeviceExtension
,
382 IN PVOID HwDeviceExtension
,
383 IN ULONG RequestsToComplete
);
389 IN PVOID HwDeviceExtension
);
392 PSTOR_SCATTER_GATHER_LIST
394 StorPortGetScatterGatherList(
395 IN PVOID DeviceExtension
,
396 IN PSCSI_REQUEST_BLOCK Srb
);
398 typedef BOOLEAN DDKAPI
399 (*PSTOR_SYNCHRONIZED_ACCESS
)(
400 IN PVOID HwDeviceExtension
,
406 StorPortSynchronizeAccess(
407 IN PVOID HwDeviceExtension
,
408 IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine
,
412 #define DebugPrint(x) StorPortDebugPrint x
414 #define DebugPrint(x)
421 #endif /* __STORPORT_H */