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
39 typedef PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS
;
41 typedef struct _STOR_SCATTER_GATHER_ELEMENT
{
42 STOR_PHYSICAL_ADDRESS PhysicalAddress
;
45 } STOR_SCATTER_GATHER_ELEMENT
, *PSTOR_SCATTER_GATHER_ELEMENT
;
47 typedef struct _STOR_SCATTER_GATHER_LIST
{
48 ULONG NumberOfElements
;
50 STOR_SCATTER_GATHER_ELEMENT List
[0];
51 } STOR_SCATTER_GATHER_LIST
, *PSTOR_SCATTER_GATHER_LIST
;
53 typedef struct _SCSI_WMI_REQUEST_BLOCK
{
65 ULONG DataTransferLength
;
70 PVOID OriginalRequest
;
74 } SCSI_WMI_REQUEST_BLOCK
, *PSCSI_WMI_REQUEST_BLOCK
;
83 IN PHW_INITIALIZATION_DATA HwInitializationData
,
89 StorPortFreeDeviceBase(
90 IN PVOID HwDeviceExtension
,
91 IN PVOID MappedAddress
);
97 IN PVOID DeviceExtension
,
99 IN ULONG SystemIoBusNumber
,
107 StorPortSetBusDataByOffset(
108 IN PVOID DeviceExtension
,
109 IN ULONG BusDataType
,
110 IN ULONG SystemIoBusNumber
,
119 StorPortGetDeviceBase(
120 IN PVOID HwDeviceExtension
,
121 IN INTERFACE_TYPE BusType
,
122 IN ULONG SystemIoBusNumber
,
123 IN SCSI_PHYSICAL_ADDRESS IoAddress
,
124 IN ULONG NumberOfBytes
,
125 IN BOOLEAN InIoSpace
);
130 StorPortGetLogicalUnit(
131 IN PVOID HwDeviceExtension
,
140 IN PVOID DeviceExtension
,
147 STOR_PHYSICAL_ADDRESS
149 StorPortGetPhysicalAddress(
150 IN PVOID HwDeviceExtension
,
151 IN PSCSI_REQUEST_BLOCK Srb
,
152 IN PVOID VirtualAddress
,
158 StorPortGetVirtualAddress(
159 IN PVOID HwDeviceExtension
,
160 IN STOR_PHYSICAL_ADDRESS PhysicalAddress
);
165 StorPortGetUncachedExtension(
166 IN PVOID HwDeviceExtension
,
167 IN PPORT_CONFIGURATION_INFORMATION ConfigInfo
,
168 IN ULONG NumberOfBytes
);
173 StorPortNotification(
174 IN SCSI_NOTIFICATION_TYPE NotificationType
,
175 IN PVOID HwDeviceExtension
,
182 IN PVOID HwDeviceExtension
,
183 IN PSCSI_REQUEST_BLOCK Srb OPTIONAL
,
193 StorPortCompleteRequest(
194 IN PVOID HwDeviceExtension
,
204 IN PVOID WriteBuffer
,
211 StorPortStallExecution(
215 STOR_PHYSICAL_ADDRESS
217 StorPortConvertUlong64ToPhysicalAddress(
218 IN ULONG64 UlongAddress
);
223 StorPortConvertPhysicalAddressToUlong64(
224 IN STOR_PHYSICAL_ADDRESS Address
);
229 StorPortValidateRange(
230 IN PVOID HwDeviceExtension
,
231 IN INTERFACE_TYPE BusType
,
232 IN ULONG SystemIoBusNumber
,
233 IN STOR_PHYSICAL_ADDRESS IoAddress
,
234 IN ULONG NumberOfBytes
,
235 IN BOOLEAN InIoSpace
);
241 IN ULONG DebugPrintLevel
,
242 IN PCCHAR DebugMessage
,
248 StorPortReadPortUchar(
254 StorPortReadPortUlong(
260 StorPortReadPortUshort(
266 StorPortReadRegisterUchar(
272 StorPortReadRegisterUlong(
278 StorPortReadRegisterUshort(
279 IN PUSHORT Register
);
284 StorPortWritePortUchar(
291 StorPortWritePortUlong(
298 StorPortWritePortUshort(
305 StorPortWriteRegisterUchar(
312 StorPortWriteRegisterUlong(
319 StorPortWriteRegisterUshort(
327 IN PVOID HwDeviceExtension
,
336 StorPortResumeDevice(
337 IN PVOID HwDeviceExtension
,
346 IN PVOID HwDeviceExtension
,
353 IN PVOID HwDeviceExtension
);
359 IN PVOID HwDeviceExtension
,
363 IN ULONG RequestsToComplete
);
369 IN PVOID HwDeviceExtension
,
378 IN PVOID HwDeviceExtension
,
379 IN ULONG RequestsToComplete
);
385 IN PVOID HwDeviceExtension
);
388 PSTOR_SCATTER_GATHER_LIST
390 StorPortGetScatterGatherList(
391 IN PVOID DeviceExtension
,
392 IN PSCSI_REQUEST_BLOCK Srb
);
395 (NTAPI
*PSTOR_SYNCHRONIZED_ACCESS
)(
396 IN PVOID HwDeviceExtension
,
402 StorPortSynchronizeAccess(
403 IN PVOID HwDeviceExtension
,
404 IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine
,
408 #define DebugPrint(x) StorPortDebugPrint x
410 #define DebugPrint(x)
417 #endif /* __STORPORT_H */