ReactOS 0.4.17-dev-1196-gb6224c3
precomp.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Storport Driver
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Storport driver common header file
5 * COPYRIGHT: Copyright 2017 Eric Kohl (eric.kohl@reactos.org)
6 */
7
8#ifndef _STORPORT_PCH_
9#define _STORPORT_PCH_
10
11#include <wdm.h>
12#include <ntddk.h>
13#include <ntintsafe.h>
14#include <ntstrsafe.h>
15#include <stdio.h>
16#include <memory.h>
17
18/* Declare STORPORT_API functions as exports rather than imports */
19#define _STORPORT_
20#include <storport.h>
21
22#include <ntddscsi.h>
23#include <ntdddisk.h>
24#include <mountdev.h>
25#include <wdmguid.h>
26
27/* Memory Tags */
28#define TAG_GLOBAL_DATA 'DGtS'
29#define TAG_INIT_DATA 'DItS'
30#define TAG_DEVICE_RELATION 'RDtS'
31#define TAG_DEVICE_ID 'DItS'
32#define TAG_DEVICE_TEXT 'XTtS'
33#define TAG_MINIPORT_DATA 'DMtS'
34#define TAG_ACCRESS_RANGE 'RAtS'
35#define TAG_RESOURCE_LIST 'LRtS'
36#define TAG_ADDRESS_MAPPING 'MAtS'
37#define TAG_INQUIRY_DATA 'QItS'
38#define TAG_REPORT_LUN_DATA 'LRtS'
39#define TAG_SENSE_DATA 'NStS'
40#define TAG_QUEUED_REQUEST 'RQtS'
41#define TAG_SRB_EXTENSION 'XStS'
42
43#define SET_FLAG(Flags, Bit) ((Flags) |= (Bit))
44#define CLEAR_FLAG(Flags, Bit) ((Flags) &= ~(Bit))
45#define TEST_FLAG(Flags, Bit) (((Flags) & (Bit)) != 0)
46
47typedef enum
48{
55
56typedef enum
57{
63
64typedef struct _DRIVER_INIT_DATA
65{
69
71{
74
78
81
83{
87
88typedef struct _MINIPORT
89{
95
96typedef struct _UNIT_DATA
97{
101
102typedef struct _TIMER_ENTRY
103{
112
113/*
114 * Storport implements some scheduling on how outstanding requests on the PDO are handled.
115 *
116 * Important facts:
117 * A PDO by default can handle (Storport will actually issue that many) 254 outstanding requests;
118 * If miniport actually ate that many requests, incoming requests will wait;
119 * If miniport thinks a device is overloaded, PDO can be marked Busy/Ready by miniport;
120 * A busy PDO device will exit Busy state when completing specified amount (or all) of IOs;
121 * The miniport can pause a PDO for a while, for stuff like load balancing;
122 * By default Storport uses tagged queuing. If an IO is untagged, it has to wait until all tagged
123 * IOs finish, then Storport will schedule these requests synchronously;
124 * If an IO error occured (SCSISTAT_CHECK_CONDITION, SCSISTAT_COMMAND_TERMINATED), a LUN is reset
125 * because of timeout, or a bus reset occured (affects all LUNs on the HBA), the PDO queue is
126 * put into a third halt state known as Frozen;
127 * Class driver can use special SRBs to Unfreeze the device queue and clear all requests it held;
128 * When class driver asks a device for power functionalities, it puts the device to a fourth holdup
129 * state known as Locked (with special SRB function, unlock as well but with a bypass flag).
130 *
131 * Access to IO Flow control is synchronized by a lock in FDO flow control, and contains all
132 * information about pausing, busy state, freezing, untagged requests and possibly other stuff
133 * that affects how Storport schedules IOs sent to the LUN.
134 */
136{
137 // KSPIN_LOCK Lock; // FIXME: Remove
138
139 /*
140 * Basic attributes to determine if a request must go waiting. Actually, awaiting request queue
141 * should be checked too (if we already got waiting requests, new requests must be served later)
142 */
147
148 /*
149 * There are cases when, even the LUN can accept more requests, a new request should still not
150 * be issued until all issued requests have completed:
151 *
152 * 1. A request can have Srb->QueueAction == SRB_ORDERED_QUEUE_TAG_REQUEST which can only be
153 * issued after all previously issued and queued requests have completed;
154 * 2. An untagged request must wait until all tagged requests complete before it can be issued;
155 *
156 * Such ordered requests are always issued only after the last active request completes. To
157 * accomplish this, we check if the request needs strong ordering before taking it out of
158 * approved queue, if it does AND the active list is not empty then this flag is set to TRUE,
159 * the command will stay at the tail of the approved list and only be issued when next time the
160 * active list is empty.
161 */
163
164 /*
165 * Ordered tagged & Untagged requests are strong ordered. When we have them in our wait queue,
166 * new requests must go waiting. This value is counted by SCSI IRP and completion handler.
167 */
169
170 /* How many active requests are still in the hands of miniport */
172
173 /* How many requests needs to be completed before PDO is no longer busy */
175
176 /* How many seconds remaining before PDO is no longer paused */
178
179 /* Requests that PDO and FDO both agreed to send, and already went to the device */
181
182 /* Requests that PDO approved to send, awaiting FDO judgement */
183 // LIST_ENTRY ApprovedRequestsListHead;
184
185 /* Requests that PDO is too busy to handle, awaiting PDO scheduling */
188
189/*
190 * Storport implements some flow control on FDO.
191 *
192 * By default FDO has 1000 total outstanding requests limit;
193 * Storport will actually issue that many requests (from all LUNs);
194 * If miniport thinks the HBA is overloaded, FDO can be marked Busy/Ready by miniport;
195 * A busy FDO will exit Busy state when completing specified amount (or all) of IOs;
196 * The miniport can pause FDO for a while, for stuff like load balancing;
197 *
198 * FDO flow control structure has a lock that synchronizes all flow controlling on an HBA.
199 */
201{
203
206
207 /* Active outstanding request count */
209
212
213 /*
214 * If FDO blocks a request from being issued, it'll be queued on both the PDO queue and
215 * this queue. This is used to implement first-come-first-serve when FDO becomes ready again
216 */
219
220/* Requests that could not allocate their private contexts. Cancel safe, as we hold them. */
222{
227
228typedef struct _FDO_DEVICE_EXTENSION
229{
231
254
258
259 /*
260 * HBA timers. The first timer, DPC & callback are for StorPortNotification's RequestTimerCall,
261 * and the timer list is for StorPortInitializeTimer (implemented in ExtendedFunction), list
262 * entry type is TIMER_ENTRY.
263 */
270
271 /* Request "flow control" */
273
274 /* This maximum number is set in port configuration */
276
277 /* The requests awaiting completion DPC processing */
279
280 /* Backing store for the per request QUEUED_REQUEST_REFERENCE packets */
282
283 /* Memory for one request, reserved at adapter start, for when pool runs out */
288
289 /*
290 * FIXME: It REALLY should be cached here. The function pointers inside are extremely frequently
291 * used but Eric didn't put them here. Need review.
292 */
294
296
297
298typedef struct _PDO_DEVICE_EXTENSION
299{
301
306
311
313
314 /* Same as FDO flow control */
318
319 LONG SpecialRequestCounter; /* FIXME: DELETE AFTER DEBUG */
320
322
323/*
324 * Storport sends SRBs to HBA, and needs to notify IRPs about IO status.
325 * Conventionally SRB has an OriginalRequest field to point to IRP, and IRP tail overlay
326 * has got a device queue entry, and that should be enough.
327 *
328 * But in Storport we also might wanna store more stuff like per request timeout value,
329 * and possibly request origin processor to redirect completion DPC to other processors,
330 * we use an additional structure here, to store some Storport private per-request data.
331 *
332 * This structure is put into FDO/PDO request queue. It is referenced by SRB OriginalRequest
333 * field, also contains SRB back reference, and source IRP is referenced by this structure.
334 *
335 * FIXME: Before completing a request, restore OriginalRequest as Classpnp will CHECK it.
336 */
338{
347 ULONG TimeoutCounter; // FIXME: Implement timeout with a heap
348 /*
349 * Indicates if the current request is outstanding. Some requests are for HBA, and shouldn't be
350 * affected by outstanding requests flow controlling.
351 * If this field is set to FALSE, this request will not trigger flow control code, flow control
352 * lock will not be acquired, and no new request will be scheduled upon its completion.
353 */
357
358 /* This packet and its SRB extension came from the reserve, not from pool */
360
361 /* FIXME: This is solely for debugging and should be removed */
365
366/* This and next one are for REPORT_LUNS command return structure, seems to be found nowhere else */
367typedef struct _LUN_DESCRIPTOR
368{
376
377typedef struct _REPORT_LUNS_DATA
378{
383
384/* fdo.c */
385
389
390VOID
393 _In_ PIRP Irp);
394
395VOID
398
399VOID
402
403VOID
406
407VOID
410
414 _In_ ULONG Bus,
416 _In_ ULONG Lun);
417
419NTAPI
422 _In_ PIRP Irp);
423
425NTAPI
428 _In_ PIRP Irp);
429
430
431/* ioctl.c */
432
434NTAPI
437 _In_ PIRP Irp);
438
440NTAPI
443 _In_ PIRP Irp);
444
445
446/* miniport.c */
447
450 _In_ PMINIPORT Miniport,
451 _In_ PFDO_DEVICE_EXTENSION DeviceExtension,
453
456 _In_ PMINIPORT Miniport);
457
460 _In_ PMINIPORT Miniport);
461
464 _In_ PMINIPORT Miniport);
465
468 _In_ PMINIPORT Miniport,
470
471/* misc.c */
472
474NTAPI
476 _In_ PDEVICE_OBJECT LowerDevice,
477 _In_ PIRP Irp);
478
482
487
491 PGUID Guid,
492 USHORT Size,
496
499 PFDO_DEVICE_EXTENSION DeviceExtension,
501 ULONG SystemIoBusNumber,
502 STOR_PHYSICAL_ADDRESS IoAddress,
504 BOOLEAN InIoSpace,
506
509 PFDO_DEVICE_EXTENSION DeviceExtension,
511 PKIRQL Irql,
515
518 PMAPPED_ADDRESS *MappedAddressList,
519 STOR_PHYSICAL_ADDRESS IoAddress,
520 PVOID MappedAddress,
523
524VOID
525NTAPI
527 PKDPC Dpc,
531
532VOID
533NTAPI
535 PKDPC Dpc,
539);
540
541PCSTR
543 _In_ PINQUIRYDATA InquiryData);
544
545PCSTR
547 _In_ PINQUIRYDATA InquiryData);
548
549/* pdo.c */
550
554 _In_ ULONG Bus,
556 _In_ ULONG Lun,
558
562
564NTAPI
567 _In_ PIRP Irp);
568
569
570/* srb.c */
571
572VOID
575
579 _In_ PQUEUED_REQUEST_REFERENCE RequestReference);
580
585 _In_ PQUEUED_REQUEST_REFERENCE RequestReference);
586
588NTAPI
591 _In_ PIRP Irp);
592
593VOID
594NTAPI
596 _In_ PKDPC Dpc,
600
601
602/* storport.c */
603
608
610NTAPI
614
615#endif /* _STORPORT_PCH_ */
unsigned char BOOLEAN
Definition: actypes.h:127
@ GetGenericType
Definition: atapi.h:567
@ GetDeviceType
Definition: atapi.h:566
LONG NTSTATUS
Definition: precomp.h:26
KAFFINITY * PKAFFINITY
Definition: basetsd.h:189
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: cdrom.h:989
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1315
_Out_ PKIRQL Irql
Definition: csq.h:179
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
Definition: srb.h:456
struct _PDO_IO_FLOW_CONTROL * PPDO_IO_FLOW_CONTROL
struct _FDO_DEVICE_EXTENSION FDO_DEVICE_EXTENSION
struct _LUN_DESCRIPTOR LUN_DESCRIPTOR
NTSTATUS NTAPI PortPdoScsi(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: srb.c:516
NTSTATUS NTAPI PortPdoDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: ioctl.c:378
NTSTATUS NTAPI PortFdoDeviceControl(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: ioctl.c:146
VOID PortFlushStarvedRequests(_In_ PFDO_DEVICE_EXTENSION FdoExtension)
Fails every queued request, for when the adapter goes away.
Definition: fdo.c:153
PPDO_DEVICE_EXTENSION FdoFindLun(_In_ PFDO_DEVICE_EXTENSION FdoExtension, _In_ ULONG Bus, _In_ ULONG Target, _In_ ULONG Lun)
Definition: fdo.c:1078
struct _PDO_IO_FLOW_CONTROL PDO_IO_FLOW_CONTROL
NTSTATUS MiniportFindAdapter(_In_ PMINIPORT Miniport)
Definition: miniport.c:294
INTERFACE_TYPE GetBusInterface(PDEVICE_OBJECT DeviceObject)
Definition: misc.c:33
NTSTATUS MiniportInitialize(_In_ PMINIPORT Miniport, _In_ PFDO_DEVICE_EXTENSION DeviceExtension, _In_ PHW_INITIALIZATION_DATA HwInitializationData)
Definition: miniport.c:239
struct _UNIT_DATA * PUNIT_DATA
struct _DRIVER_INIT_DATA DRIVER_INIT_DATA
struct _LUN_DESCRIPTOR * PLUN_DESCRIPTOR
struct _STARVED_REQUEST_QUEUE * PSTARVED_REQUEST_QUEUE
struct _FDO_DEVICE_EXTENSION * PFDO_DEVICE_EXTENSION
VOID PortFreeRequestReserve(_In_ PFDO_DEVICE_EXTENSION FdoExtension)
Releases the reserve. No request may be using it anymore.
Definition: fdo.c:205
NTSTATUS PortDeletePdo(_In_ PPDO_DEVICE_EXTENSION PdoExtension)
Definition: pdo.c:108
VOID NTAPI TimerCallbackDpcRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
Definition: misc.c:348
BOOLEAN PortPdoScheduleRequestFlowControlled(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PFDO_DEVICE_EXTENSION FdoExtension, _In_ PQUEUED_REQUEST_REFERENCE RequestReference)
Schedules an outstanding request and return a boolean value to indicate if the request can be immedia...
Definition: srb.c:397
struct _QUEUED_REQUEST_REFERENCE QUEUED_REQUEST_REFERENCE
NTSTATUS NTAPI PortPdoPnp(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: pdo.c:681
NTSTATUS PortInitializeStarvedRequestQueue(_In_ PSTARVED_REQUEST_QUEUE Queue)
Definition: fdo.c:105
struct _MINIPORT MINIPORT
NTSTATUS AllocateAddressMapping(PMAPPED_ADDRESS *MappedAddressList, STOR_PHYSICAL_ADDRESS IoAddress, PVOID MappedAddress, ULONG NumberOfBytes, ULONG BusNumber)
Definition: misc.c:291
struct _REPORT_LUNS_DATA REPORT_LUNS_DATA
BOOLEAN MiniportHwInterrupt(_In_ PMINIPORT Miniport)
Definition: miniport.c:362
PHW_INITIALIZATION_DATA PortGetDriverInitData(PDRIVER_OBJECT_EXTENSION DriverExtension, INTERFACE_TYPE InterfaceType)
Definition: storport.c:81
struct _TIMER_ENTRY TIMER_ENTRY
struct _PDO_DEVICE_EXTENSION PDO_DEVICE_EXTENSION
VOID StorpSrbFreeRequestReference(_In_ PSCSI_REQUEST_BLOCK Srb)
Frees an SRB's Request Reference and restore Srb->OriginalRequest field to IRP. This function does no...
Definition: srb.c:106
struct _REPORT_LUNS_DATA * PREPORT_LUNS_DATA
struct _MINIPORT_DEVICE_EXTENSION * PMINIPORT_DEVICE_EXTENSION
VOID PortQueueStarvedRequest(_In_ PFDO_DEVICE_EXTENSION FdoExtension, _In_ PIRP Irp)
Queues a request that could not allocate its private contexts.
Definition: fdo.c:124
NTSTATUS QueryBusInterface(PDEVICE_OBJECT DeviceObject, PGUID Guid, USHORT Size, USHORT Version, PBUS_INTERFACE_STANDARD Interface, PVOID InterfaceSpecificData)
Definition: misc.c:122
struct _QUEUED_REQUEST_REFERENCE * PQUEUED_REQUEST_REFERENCE
struct _FDO_IO_FLOW_CONTROL * PFDO_IO_FLOW_CONTROL
struct _PDO_DEVICE_EXTENSION * PPDO_DEVICE_EXTENSION
DEVICE_STATE
Definition: precomp.h:48
@ dsSurpriseRemoved
Definition: precomp.h:53
@ dsStopped
Definition: precomp.h:49
@ dsPaused
Definition: precomp.h:51
@ dsStarted
Definition: precomp.h:50
@ dsRemoved
Definition: precomp.h:52
BOOLEAN TranslateResourceListAddress(PFDO_DEVICE_EXTENSION DeviceExtension, INTERFACE_TYPE BusType, ULONG SystemIoBusNumber, STOR_PHYSICAL_ADDRESS IoAddress, ULONG NumberOfBytes, BOOLEAN InIoSpace, PPHYSICAL_ADDRESS TranslatedAddress)
Definition: misc.c:173
struct _MINIPORT_DEVICE_EXTENSION MINIPORT_DEVICE_EXTENSION
BOOLEAN MiniportStartIo(_In_ PMINIPORT Miniport, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: miniport.c:378
PCM_RESOURCE_LIST CopyResourceList(POOL_TYPE PoolType, PCM_RESOURCE_LIST Source)
Definition: misc.c:92
NTSTATUS MiniportHwInitialize(_In_ PMINIPORT Miniport)
Definition: miniport.c:346
NTSTATUS PortCreatePdo(_In_ PFDO_DEVICE_EXTENSION FdoExtension, _In_ ULONG Bus, _In_ ULONG Target, _In_ ULONG Lun, _Out_ PPDO_DEVICE_EXTENSION *PdoExtension)
Definition: pdo.c:21
NTSTATUS GetResourceListInterrupt(PFDO_DEVICE_EXTENSION DeviceExtension, PULONG Vector, PKIRQL Irql, KINTERRUPT_MODE *InterruptMode, PBOOLEAN ShareVector, PKAFFINITY Affinity)
Definition: misc.c:242
VOID NTAPI SimpleTimerCallbackDpcRoutine(PKDPC Dpc, PVOID DeferredContext, PVOID SystemArgument1, PVOID SystemArgument2)
Definition: misc.c:327
struct _MINIPORT * PMINIPORT
struct _DRIVER_OBJECT_EXTENSION * PDRIVER_OBJECT_EXTENSION
VOID PortRetryStarvedRequest(_In_ PFDO_DEVICE_EXTENSION FdoExtension)
Retries one queued request, so each completion lets exactly one through.
Definition: fdo.c:135
struct _FDO_IO_FLOW_CONTROL FDO_IO_FLOW_CONTROL
struct _TIMER_ENTRY * PTIMER_ENTRY
EXTENSION_TYPE
Definition: precomp.h:57
@ InvalidExtension
Definition: precomp.h:58
@ PdoExtension
Definition: precomp.h:61
@ DriverExtension
Definition: precomp.h:59
@ FdoExtension
Definition: precomp.h:60
VOID NTAPI PortCompletionDpc(_In_ PKDPC Dpc, _In_ PVOID Context, _In_ PVOID SystemArgument1, _In_ PVOID SystemArgument2)
Definition: srb.c:894
struct _DRIVER_INIT_DATA * PDRIVER_INIT_DATA
struct _UNIT_DATA UNIT_DATA
NTSTATUS NTAPI PortFdoScsi(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: fdo.c:1111
struct _DRIVER_OBJECT_EXTENSION DRIVER_OBJECT_EXTENSION
NTSTATUS PortPdoIssueRequest(_In_ PPDO_DEVICE_EXTENSION PdoExtension, _In_ PQUEUED_REQUEST_REFERENCE RequestReference)
Definition: srb.c:290
struct _STARVED_REQUEST_QUEUE STARVED_REQUEST_QUEUE
VOID PortAllocateRequestReserve(_In_ PFDO_DEVICE_EXTENSION FdoExtension)
Reserves the memory a single request needs, so IO can still be issued out of pool.
Definition: fdo.c:168
NTSTATUS NTAPI PortFdoPnp(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
Definition: fdo.c:1139
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
DRIVER_DISPATCH ForwardIrpAndForget
Definition: i8042prt.h:341
_In_ PIRP Irp
Definition: kse.h:79
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
_In_ ULONG BusNumber
Definition: pciidex.h:65
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
enum _INTERFACE_TYPE INTERFACE_TYPE
enum _KINTERRUPT_MODE KINTERRUPT_MODE
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:906
VOID(NTAPI * PHW_TIMER_EX)(_In_ PVOID DeviceExtension, _In_opt_ PVOID Context)
Definition: storport.h:2269
BOOLEAN(* PHW_PASSIVE_INITIALIZE_ROUTINE)(_In_ PVOID DeviceExtension)
Definition: storport.h:2310
HW_INITIALIZATION_DATA HwInitData
Definition: precomp.h:67
LIST_ENTRY Entry
Definition: precomp.h:66
LIST_ENTRY AdapterListHead
Definition: precomp.h:76
LIST_ENTRY InitDataListHead
Definition: precomp.h:79
PDRIVER_OBJECT DriverObject
Definition: precomp.h:73
KSPIN_LOCK AdapterListLock
Definition: precomp.h:75
EXTENSION_TYPE ExtensionType
Definition: precomp.h:72
PMAPPED_ADDRESS MappedAddressList
Definition: precomp.h:246
PDEVICE_OBJECT LowerDevice
Definition: i8042prt.h:130
PCM_RESOURCE_LIST AllocatedResources
Definition: precomp.h:242
struct _QUEUED_REQUEST_REFERENCE * ReservedRequestReference
Definition: precomp.h:284
PDEVICE_OBJECT PhysicalDevice
Definition: precomp.h:234
PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitRoutine
Definition: precomp.h:251
PVOID ReservedSrbExtension
Definition: precomp.h:285
LIST_ENTRY PdoListHead
Definition: precomp.h:256
KSPIN_LOCK PdoListLock
Definition: precomp.h:255
ULONG BusNumber
Definition: pci.h:88
PVOID UncachedExtensionVirtualBase
Definition: precomp.h:247
LIST_ENTRY TimerListHead
Definition: precomp.h:268
PHW_TIMER TimerCallback
Definition: precomp.h:266
PCM_RESOURCE_LIST TranslatedResources
Definition: precomp.h:243
NPAGED_LOOKASIDE_LIST RequestReferenceLookaside
Definition: precomp.h:281
DEVICE_STATE PnpState
Definition: i8042prt.h:132
ULONG UncachedExtensionSize
Definition: precomp.h:249
PHW_INITIALIZATION_DATA HwInitData
Definition: precomp.h:293
EXTENSION_TYPE ExtensionType
Definition: precomp.h:230
PDEVICE_OBJECT Device
Definition: precomp.h:232
FDO_IO_FLOW_CONTROL FlowControl
Definition: precomp.h:272
ULONG OutstandingRequestMax
Definition: precomp.h:275
PDMA_ADAPTER DmaAdapter
Definition: precomp.h:250
BOOLEAN BusInitialized
Definition: precomp.h:245
LIST_ENTRY AdapterListEntry
Definition: precomp.h:237
PHYSICAL_ADDRESS UncachedExtensionPhysicalBase
Definition: precomp.h:248
PDRIVER_OBJECT_EXTENSION DriverExtension
Definition: precomp.h:235
KSPIN_LOCK TimerListLock
Definition: precomp.h:267
SLIST_HEADER CompletionList
Definition: precomp.h:278
PKINTERRUPT Interrupt
Definition: parport.h:48
STARVED_REQUEST_QUEUE StarvedRequests
Definition: precomp.h:287
BUS_INTERFACE_STANDARD BusInterface
Definition: precomp.h:244
LIST_ENTRY FdoBlockedRequestsListHead
Definition: precomp.h:217
ULONG OutstandingRequestCount
Definition: precomp.h:208
KSPIN_LOCK Lock
Definition: precomp.h:202
ULONG RemainingBusyRequests
Definition: precomp.h:210
ULONG RemainingPauseTime
Definition: precomp.h:211
Definition: csq.h:222
Definition: ketypes.h:767
Definition: typedefs.h:120
UCHAR Level2Address[2]
Definition: precomp.h:372
UCHAR AddressMethod
Definition: precomp.h:370
UCHAR Level4Address[2]
Definition: precomp.h:374
UCHAR Level3Address[2]
Definition: precomp.h:373
UCHAR Level1Address
Definition: precomp.h:371
struct _MINIPORT * Miniport
Definition: precomp.h:84
UCHAR HwDeviceExtension[0]
Definition: precomp.h:85
PORT_CONFIGURATION_INFORMATION PortConfig
Definition: precomp.h:92
PHW_INITIALIZATION_DATA InitData
Definition: precomp.h:91
struct _FDO_DEVICE_EXTENSION * DeviceExtension
Definition: precomp.h:90
PMINIPORT_DEVICE_EXTENSION MiniportExtension
Definition: precomp.h:93
PFDO_DEVICE_EXTENSION FdoExtension
Definition: precomp.h:303
PDO_IO_FLOW_CONTROL FlowControl
Definition: precomp.h:315
LIST_ENTRY PdoListEntry
Definition: precomp.h:305
PDEVICE_OBJECT Device
Definition: precomp.h:302
ULONG OutstandingRequestMax
Definition: precomp.h:316
PINQUIRYDATA InquiryBuffer
Definition: precomp.h:310
DEVICE_STATE PnpState
Definition: precomp.h:304
EXTENSION_TYPE ExtensionType
Definition: precomp.h:300
LONG SpecialRequestCounter
Definition: precomp.h:319
LIST_ENTRY ActiveRequestsListHead
Definition: precomp.h:180
BOOLEAN IsWaitingQueueClear
Definition: precomp.h:162
ULONG RemainingBusyRequests
Definition: precomp.h:174
ULONG OutstandingRequestCount
Definition: precomp.h:171
ULONG StrongOrderedCount
Definition: precomp.h:168
ULONG RemainingPauseTime
Definition: precomp.h:177
LIST_ENTRY AwaitingRequestsListHead
Definition: precomp.h:186
PSCSI_REQUEST_BLOCK Srb
Definition: precomp.h:343
PSTOR_SCATTER_GATHER_LIST ScatterGatherList
Definition: precomp.h:345
PPDO_DEVICE_EXTENSION PdoExtension
Definition: precomp.h:342
SLIST_ENTRY CompletionEntry
Definition: precomp.h:339
LUN_DESCRIPTOR LunDescriptor[1]
Definition: precomp.h:381
UCHAR LunListLength[4]
Definition: precomp.h:379
LIST_ENTRY ListHead
Definition: precomp.h:225
Definition: precomp.h:103
KTIMER Timer
Definition: precomp.h:105
PVOID Context
Definition: precomp.h:110
LONG TimerAlreadySet
Definition: precomp.h:107
PHW_TIMER_EX TimerCallback
Definition: precomp.h:109
LIST_ENTRY ListEntry
Definition: precomp.h:104
KDPC TimerCallbackDpc
Definition: precomp.h:106
PVOID HwDeviceExtension
Definition: precomp.h:108
LIST_ENTRY ListEntry
Definition: precomp.h:98
INQUIRYDATA InquiryData
Definition: precomp.h:99
#define SLIST_ENTRY(type)
Definition: queue.h:102
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: typedefs.h:53
unsigned char * PBOOLEAN
Definition: typedefs.h:53
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG
Definition: typedefs.h:59
_In_ UCXUSBDEVICE _In_ ULONG Interface
Definition: ucxusbdevice.h:428
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3821
_Must_inspect_result_ _In_ WDFDEVICE _In_ PIRP _In_ WDFQUEUE Queue
Definition: wdfdevice.h:2231
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:112
_Must_inspect_result_ _In_ PDRIVER_OBJECT _In_ PCUNICODE_STRING RegistryPath
Definition: wdfdriver.h:215
_Must_inspect_result_ _In_ PDRIVER_OBJECT DriverObject
Definition: wdfdriver.h:213
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:463
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT _In_opt_ PVOID InterfaceSpecificData
Definition: wdffdo.h:472
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:174
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:159
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE InterruptMode
Definition: iofuncs.h:806
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG _Out_ PPHYSICAL_ADDRESS TranslatedAddress
Definition: iofuncs.h:2275
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK _In_ ULONG _In_ KIRQL _In_ KIRQL _In_ KINTERRUPT_MODE _In_ BOOLEAN ShareVector
Definition: iofuncs.h:807
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:756
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:755
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:757