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
,
87 StorPortFreeDeviceBase(
88 IN PVOID HwDeviceExtension
,
89 IN PVOID MappedAddress
);
95 IN PVOID DeviceExtension
,
97 IN ULONG SystemIoBusNumber
,
105 StorPortSetBusDataByOffset(
106 IN PVOID DeviceExtension
,
107 IN ULONG BusDataType
,
108 IN ULONG SystemIoBusNumber
,
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 PSCSI_REQUEST_BLOCK Srb
,
150 IN PVOID VirtualAddress
,
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 PSCSI_REQUEST_BLOCK Srb OPTIONAL
,
191 StorPortCompleteRequest(
192 IN PVOID HwDeviceExtension
,
202 IN PVOID WriteBuffer
,
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(
252 StorPortReadPortUlong(
258 StorPortReadPortUshort(
264 StorPortReadRegisterUchar(
270 StorPortReadRegisterUlong(
276 StorPortReadRegisterUshort(
277 IN PUSHORT Register
);
282 StorPortWritePortUchar(
289 StorPortWritePortUlong(
296 StorPortWritePortUshort(
303 StorPortWriteRegisterUchar(
310 StorPortWriteRegisterUlong(
317 StorPortWriteRegisterUshort(
325 IN PVOID HwDeviceExtension
,
334 StorPortResumeDevice(
335 IN PVOID HwDeviceExtension
,
344 IN PVOID HwDeviceExtension
,
351 IN PVOID HwDeviceExtension
);
357 IN PVOID HwDeviceExtension
,
361 IN ULONG RequestsToComplete
);
367 IN PVOID HwDeviceExtension
,
376 IN PVOID HwDeviceExtension
,
377 IN ULONG RequestsToComplete
);
383 IN PVOID HwDeviceExtension
);
386 PSTOR_SCATTER_GATHER_LIST
388 StorPortGetScatterGatherList(
389 IN PVOID DeviceExtension
,
390 IN PSCSI_REQUEST_BLOCK Srb
);
393 (NTAPI
*PSTOR_SYNCHRONIZED_ACCESS
)(
394 IN PVOID HwDeviceExtension
,
400 StorPortSynchronizeAccess(
401 IN PVOID HwDeviceExtension
,
402 IN PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine
,
406 #define DebugPrint(x) StorPortDebugPrint x
408 #define DebugPrint(x)
415 #endif /* __STORPORT_H */