ReactOS  0.4.14-dev-608-gd495a4f
pnp.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS Kernel Streaming
4  * FILE: drivers/wdm/audio/legacy/stream/pnp.c
5  * PURPOSE: pnp handling
6  * PROGRAMMER: Johannes Anderwald
7  */
8 
9 #include "stream.h"
10 
11 VOID
13  IN PIRP Irp,
16 {
17  Irp->IoStatus.Status = Status;
18  Irp->IoStatus.Information = Information;
20 }
21 
22 VOID
23 NTAPI
26 {
27  PSTREAM_DEVICE_EXTENSION DeviceExtension;
30 
31  /* Get device extension */
33 
34  /* Disconnect interrupt */
35  if (DeviceExtension->Interrupt)
36  {
37  IoDisconnectInterrupt(DeviceExtension->Interrupt);
38  DeviceExtension->Interrupt = NULL;
39  }
40 
41  /* Release DmaAdapter */
42  if (DeviceExtension->DmaAdapter)
43  {
44  DeviceExtension->DmaAdapter->DmaOperations->PutDmaAdapter(DeviceExtension->DmaAdapter);
45  DeviceExtension->DmaAdapter = NULL;
46  }
47 
48  /* Release mem mapped I/O */
49  while(!IsListEmpty(&DeviceExtension->MemoryResourceList))
50  {
51  Entry = RemoveHeadList(&DeviceExtension->MemoryResourceList);
53 
54  MmUnmapIoSpace(Mem->Start, Mem->Length);
56  }
57 }
58 
59 BOOLEAN
60 NTAPI
62  IN PKINTERRUPT Interrupt,
65 {
66  /* This function is used when the driver either implements synchronization on its own
67  * or if there is no interrupt assigned
68  */
70 }
71 
72 VOID
73 NTAPI
75  IN PKDPC Dpc,
79 {
80  //TODO
81  //read/write data
82 }
83 
84 
85 BOOLEAN
86 NTAPI
88  IN PKINTERRUPT Interrupt,
90 {
91  BOOLEAN Ret = FALSE;
93 
94  /* Does the driver implement HwInterrupt routine */
95  if (DeviceExtension->DriverExtension->Data.HwInterrupt)
96  {
97  /* Check if the interrupt was coming from this device */
98  Ret = DeviceExtension->DriverExtension->Data.HwInterrupt(DeviceExtension->DeviceExtension);
99  if (Ret)
100  {
101  /* Interrupt has from this device, schedule a Dpc for us */
102  KeInsertQueueDpc(&DeviceExtension->InterruptDpc, NULL, NULL);
103  }
104  }
105  /* Return result */
106  return Ret;
107 }
108 
109 
110 
111 NTSTATUS
112 NTAPI
115  IN PIRP Irp)
116 {
117  PHW_STREAM_REQUEST_BLOCK_EXT RequestBlock;
119  PSTREAM_DEVICE_EXTENSION DeviceExtension;
120  PIO_STACK_LOCATION IoStack;
123  PSTREAM_CLASS_DRIVER_EXTENSION DriverObjectExtension;
124  PDMA_ADAPTER Adapter;
125  DEVICE_DESCRIPTION DeviceDesc;
128  BOOLEAN bUseDMA, bUseInterrupt;
129  ULONG MapRegisters;
130  KAFFINITY Affinity = 0;
131  PHW_STREAM_DESCRIPTOR StreamDescriptor;
133  PVOID MappedAddr;
135 
136  /* Get current stack location */
138 
139  /* Get resource list */
140  List = IoStack->Parameters.StartDevice.AllocatedResourcesTranslated;
141  /* Calculate request length */
142  ResultLength = sizeof(HW_STREAM_REQUEST_BLOCK_EXT) + sizeof(PPORT_CONFIGURATION_INFORMATION) + List->List[0].PartialResourceList.Count * sizeof(ACCESS_RANGE);
143 
144  /* Allocate Request Block */
145  RequestBlock = ExAllocatePool(NonPagedPool, ResultLength);
146 
147  if (!RequestBlock)
148  {
149  /* Not enough memory */
152  }
153 
154  /* Get device extension */
156 
157  /* Get driver object extension */
158  DriverObjectExtension = IoGetDriverObjectExtension(DeviceObject->DriverObject, (PVOID)StreamClassAddDevice);
159 
160  /* sanity checks */
161  ASSERT(DeviceExtension);
162  ASSERT(DriverObjectExtension);
163 
164  /* Zero request block */
165  RtlZeroMemory(RequestBlock, ResultLength);
166 
167  /* Locate Config struct */
168  Config = (PPORT_CONFIGURATION_INFORMATION) (RequestBlock + 1);
169  Range = (PACCESS_RANGE) (Config + 1);
170 
171  /* Initialize Request */
172  RequestBlock->Block.SizeOfThisPacket = sizeof(HW_STREAM_REQUEST_BLOCK);
173  RequestBlock->Block.Command = SRB_INITIALIZE_DEVICE;
174  RequestBlock->Block.CommandData.ConfigInfo = Config;
176 
177  Config->SizeOfThisPacket = sizeof(PPORT_CONFIGURATION_INFORMATION);
178  Config->HwDeviceExtension = (PVOID) (DeviceExtension + 1);
179  Config->ClassDeviceObject = DeviceObject;
180  Config->PhysicalDeviceObject = DeviceExtension->LowerDeviceObject;
181  Config->RealPhysicalDeviceObject = DeviceExtension->PhysicalDeviceObject;
182  Config->AccessRanges = Range;
183 
186 
187  /* Get resource list */
188  List = IoStack->Parameters.StartDevice.AllocatedResourcesTranslated;
189 
190  /* Scan the translated resources */
191  bUseDMA = FALSE;
192  bUseInterrupt = FALSE;
193 
194  Range = (PACCESS_RANGE) (Config + 1);
195 
196  for(Index = 0; Index < List->List[0].PartialResourceList.Count; Index++)
197  {
198  /* Locate partial descriptor */
199  Descriptor = &List->List[0].PartialResourceList.PartialDescriptors[Index];
200 
201  switch(Descriptor->Type)
202  {
203  case CmResourceTypePort:
204  {
205  /* Store resource information in AccessRange struct */
206  Range[Config->NumberOfAccessRanges].RangeLength = Descriptor->u.Port.Length;
207  Range[Config->NumberOfAccessRanges].RangeStart.QuadPart = Descriptor->u.Port.Start.QuadPart;
208  Range[Config->NumberOfAccessRanges].RangeInMemory = FALSE;
209  Config->NumberOfAccessRanges++;
210  break;
211  }
213  {
214  /* Store resource information */
215  Config->BusInterruptLevel = Descriptor->u.Interrupt.Level;
216  Config->BusInterruptVector = Descriptor->u.Interrupt.Vector;
217  Config->InterruptMode = Descriptor->Flags;
218  Affinity = Descriptor->u.Interrupt.Affinity;
219  bUseInterrupt = TRUE;
220  break;
221  }
223  {
225  MappedAddr = MmMapIoSpace(Descriptor->u.Memory.Start, Descriptor->u.Memory.Length, MmNonCached);
226  if (!MappedAddr || !Mem)
227  {
228  if (Mem)
229  {
230  /* Release Memory resource descriptor */
231  ExFreePool(Mem);
232  }
233 
234  if (MappedAddr)
235  {
236  /* Release mem mapped I/O */
237  MmUnmapIoSpace(MappedAddr, Descriptor->u.Memory.Length);
238  }
239 
240  /* Release resources */
242  /* Complete irp */
244  ExFreePool(RequestBlock);
246  }
247  /* Store range for driver */
248  Range[Config->NumberOfAccessRanges].RangeLength = Descriptor->u.Memory.Length;
249  Range[Config->NumberOfAccessRanges].RangeStart.QuadPart = Descriptor->u.Memory.Start.QuadPart;
250  Range[Config->NumberOfAccessRanges].RangeInMemory = TRUE;
251  Config->NumberOfAccessRanges++;
252  /* Initialize Memory resource descriptor */
253  Mem->Length = Descriptor->u.Memory.Length;
254  Mem->Start = MappedAddr;
255  InsertTailList(&DeviceExtension->MemoryResourceList, &Mem->Entry);
256  break;
257  }
258  case CmResourceTypeDma:
259  {
260  bUseDMA = TRUE;
261  Config->DmaChannel = Descriptor->u.Dma.Channel;
262  break;
263  }
264  }
265  }
266 
267  if (!bUseInterrupt || DriverObjectExtension->Data.HwInterrupt == NULL || Config->BusInterruptLevel == 0 || Config->BusInterruptVector == 0)
268  {
269  /* requirements not satisfied */
270  DeviceExtension->SynchronizeFunction = StreamClassSynchronize;
271  }
272  else
273  {
274  /* use real sync routine */
275  DeviceExtension->SynchronizeFunction = KeSynchronizeExecution;
276 
277  /* connect interrupt */
278  Status = IoConnectInterrupt(&DeviceExtension->Interrupt,
280  (PVOID)DeviceExtension,
281  NULL,
282  Config->BusInterruptVector,
283  Config->BusInterruptLevel,
284  Config->BusInterruptLevel,
285  Config->InterruptMode,
286  TRUE,
287  Affinity,
288  FALSE);
289  if (!NT_SUCCESS(Status))
290  {
291  /* Release resources */
293  /* Failed to connect interrupt */
294  CompleteIrp(Irp, Status, 0);
295  /* Release request block */
296  ExFreePool(RequestBlock);
297  return Status;
298  }
299 
300  /* store interrupt object */
301  Config->InterruptObject = DeviceExtension->Interrupt;
302  }
303 
304  /* does the device use DMA */
305  if (bUseDMA && DriverObjectExtension->Data.BusMasterDMA)
306  {
307  /* Zero device description */
308  RtlZeroMemory(&DeviceDesc, sizeof(DEVICE_DESCRIPTION));
309 
310  DeviceDesc.Version = DEVICE_DESCRIPTION_VERSION;
311  DeviceDesc.Master = TRUE;
312  DeviceDesc.ScatterGather = TRUE;
313  DeviceDesc.AutoInitialize = FALSE;
314  DeviceDesc.DmaChannel = Config->DmaChannel;
315  DeviceDesc.InterfaceType = Config->AdapterInterfaceType;
316  DeviceDesc.DmaWidth = Width32Bits;
317  DeviceDesc.DmaSpeed = Compatible;
318  DeviceDesc.MaximumLength = MAXULONG;
319  DeviceDesc.Dma32BitAddresses = DriverObjectExtension->Data.Dma24BitAddresses;
320 
321  Adapter = IoGetDmaAdapter(DeviceExtension->PhysicalDeviceObject, &DeviceDesc, &MapRegisters);
322  if (!Adapter)
323  {
324  /* Failed to claim DMA Adapter */
325  CompleteIrp(Irp, Status, 0);
326  /* Release resources */
328  /* Release request block */
329  ExFreePool(RequestBlock);
330  return Status;
331  }
332 
333  if (DeviceExtension->DriverExtension->Data.DmaBufferSize)
334  {
335  DeviceExtension->DmaCommonBuffer = Adapter->DmaOperations->AllocateCommonBuffer(Adapter, DeviceExtension->DriverExtension->Data.DmaBufferSize, &DeviceExtension->DmaPhysicalAddress, FALSE);
336  if (!DeviceExtension->DmaCommonBuffer)
337  {
338  /* Failed to allocate a common buffer */
339  CompleteIrp(Irp, Status, 0);
340  /* Release resources */
342  /* Release request block */
343  ExFreePool(RequestBlock);
344  return Status;
345  }
346  }
347 
348 
349  DeviceExtension->MapRegisters = MapRegisters;
350  DeviceExtension->DmaAdapter = Adapter;
351  Config->DmaAdapterObject = (PADAPTER_OBJECT)Adapter;
352  }
353 
354 
355  /* First forward the request to lower attached device object */
357  if (!NT_SUCCESS(Status))
358  {
359  /* Failed to start lower devices */
360  CompleteIrp(Irp, Status, 0);
361  /* Release resources */
363  /* Release request block */
364  ExFreePool(RequestBlock);
365  return Status;
366  }
367 
368  Config->Irp = Irp;
369 
370  /* FIXME SYNCHRONIZATION */
371 
372  /* Send the request */
373  DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
374  if (RequestBlock->Block.Status == STATUS_PENDING)
375  {
376  /* Request is pending, wait for result */
377  KeWaitForSingleObject(&RequestBlock->Event, Executive, KernelMode, FALSE, NULL);
378  /* Get final status code */
379  Status = RequestBlock->Block.Status;
380  }
381 
382  /* Copy stream descriptor size */
383  DeviceExtension->StreamDescriptorSize = Config->StreamDescriptorSize;
384 
385  /* check if the request has succeeded or if stream size is valid*/
386  if (!NT_SUCCESS(Status)|| !Config->StreamDescriptorSize)
387  {
388  /* Failed to start device */
389  CompleteIrp(Irp, Status, 0);
390  /* Release resources */
392  /* Release request block */
393  ExFreePool(RequestBlock);
394  return Status;
395  }
396 
397  /* Allocate a stream Descriptor */
398  StreamDescriptor = ExAllocatePool(NonPagedPool, DeviceExtension->StreamDescriptorSize);
399  if (!StreamDescriptor)
400  {
401  /* Not enough memory */
403  /* Release resources */
405  /* Release request block */
406  ExFreePool(RequestBlock);
408  }
409 
410  /* Zero stream descriptor */
411  RtlZeroMemory(StreamDescriptor, DeviceExtension->StreamDescriptorSize);
412 
413  /* Setup get stream info struct */
414  RequestBlock->Block.Command = SRB_GET_STREAM_INFO;
415  RequestBlock->Block.CommandData.StreamBuffer = StreamDescriptor;
416  KeClearEvent(&RequestBlock->Event);
417 
418  /* send the request */
419  DriverObjectExtension->Data.HwReceivePacket((PHW_STREAM_REQUEST_BLOCK)RequestBlock);
420  if (RequestBlock->Block.Status == STATUS_PENDING)
421  {
422  /* Request is pending, wait for result */
423  KeWaitForSingleObject(&RequestBlock->Event, Executive, KernelMode, FALSE, NULL);
424  /* Get final status code */
425  Status = RequestBlock->Block.Status;
426  }
427 
428  if (NT_SUCCESS(Status))
429  {
430  /* store stream descriptor */
431  DeviceExtension->StreamDescriptor = StreamDescriptor;
432  }
433  else
434  {
435  /* cleanup resources */
436  ExFreePool(StreamDescriptor);
437  }
438 
439  ExFreePool(RequestBlock);
440  /* Complete Irp */
441  CompleteIrp(Irp, Status, 0);
442  /* Return result */
443  return Status;
444 }
445 
446 NTSTATUS
447 NTAPI
450  IN PIRP Irp)
451 {
452  PIO_STACK_LOCATION IoStack;
453 
454  /* Get current irp stack location */
456 
457  switch (IoStack->MinorFunction)
458  {
459  case IRP_MN_START_DEVICE:
460  {
462  }
463  }
464 
466  return STATUS_NOT_SUPPORTED;
467 }
468 
469 
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
#define IN
Definition: typedefs.h:38
VOID NTAPI StreamClassReleaseResources(IN PDEVICE_OBJECT DeviceObject)
Definition: pnp.c:24
struct _ACCESS_RANGE ACCESS_RANGE
#define TRUE
Definition: types.h:120
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
struct MEMORY_RESOURCE_LIST * PMEMORY_RESOURCE_LIST
enum _INTERFACE_TYPE INTERFACE_TYPE
struct _DMA_ADAPTER * PADAPTER_OBJECT
Definition: wdm.template.h:206
VOID NTAPI StreamClassInterruptDpc(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: pnp.c:74
struct _Entry Entry
Definition: kefuncs.h:640
PDMA_ADAPTER NTAPI IoGetDmaAdapter(IN PDEVICE_OBJECT PhysicalDeviceObject, IN PDEVICE_DESCRIPTION DeviceDescription, IN OUT PULONG NumberOfMapRegisters)
Definition: pnpdma.c:23
PKINTERRUPT Interrupt
Definition: stream.h:37
_In_ PIRP Irp
Definition: csq.h:116
HW_INITIALIZATION_DATA Data
Definition: stream.h:13
BOOLEAN NTAPI KeInsertQueueDpc(IN PKDPC Dpc, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: dpc.c:724
static int Config(const char **args)
Definition: vfdcmd.c:778
LONG NTSTATUS
Definition: precomp.h:26
DMA_SPEED DmaSpeed
Definition: iotypes.h:2038
SYNCHRONIZE_FUNC SynchronizeFunction
Definition: stream.h:30
PVOID NTAPI MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, IN SIZE_T NumberOfBytes, IN MEMORY_CACHING_TYPE CacheType)
Definition: iosup.c:47
#define InsertTailList(ListHead, Entry)
struct _HW_STREAM_REQUEST_BLOCK HW_STREAM_REQUEST_BLOCK
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
BOOLEAN NTAPI StreamClassSynchronize(IN PKINTERRUPT Interrupt, IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID SynchronizeContext)
Definition: pnp.c:61
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
struct _DMA_OPERATIONS * DmaOperations
Definition: iotypes.h:2187
#define CmResourceTypePort
Definition: hwresource.cpp:123
#define DEVICE_DESCRIPTION_VERSION
Definition: iotypes.h:2020
VOID CompleteIrp(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: pnp.c:12
BOOLEAN NTAPI StreamClassInterruptRoutine(IN PKINTERRUPT Interrupt, IN PVOID ServiceContext)
Definition: pnp.c:87
PHYSICAL_ADDRESS DmaPhysicalAddress
Definition: stream.h:35
uint32_t ULONG_PTR
Definition: typedefs.h:63
struct tagRange Range
NTSTATUS NTAPI ForwardIrpSynchronous(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: helper.c:29
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
struct _PORT_CONFIGURATION_INFORMATION * ConfigInfo
Definition: strmini.h:237
BOOLEAN Dma24BitAddresses
Definition: strmini.h:364
NTSTATUS NTAPI IoConnectInterrupt(OUT PKINTERRUPT *InterruptObject, IN PKSERVICE_ROUTINE ServiceRoutine, IN PVOID ServiceContext, IN PKSPIN_LOCK SpinLock, IN ULONG Vector, IN KIRQL Irql, IN KIRQL SynchronizeIrql, IN KINTERRUPT_MODE InterruptMode, IN BOOLEAN ShareVector, IN KAFFINITY ProcessorEnableMask, IN BOOLEAN FloatingSave)
Definition: irq.c:22
PHW_INTERRUPT HwInterrupt
Definition: srb.h:561
PVOID DeviceExtension
Definition: env_spec_w32.h:418
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
VOID NTAPI IoDisconnectInterrupt(PKINTERRUPT InterruptObject)
Definition: irq.c:140
KSYNCHRONIZE_ROUTINE * PKSYNCHRONIZE_ROUTINE
Definition: ketypes.h:863
#define IoCompleteRequest
Definition: irp.c:1240
FORCEINLINE PLIST_ENTRY RemoveHeadList(_Inout_ PLIST_ENTRY ListHead)
Definition: rtlfuncs.h:128
NTSTATUS NTAPI IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject, IN DEVICE_REGISTRY_PROPERTY DeviceProperty, IN ULONG BufferLength, OUT PVOID PropertyBuffer, OUT PULONG ResultLength)
Definition: pnpmgr.c:4228
void * PVOID
Definition: retypes.h:9
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
BOOLEAN Dma32BitAddresses
Definition: iotypes.h:2030
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
NTSTATUS NTAPI StreamClassStartDevice(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:113
_In_ LARGE_INTEGER _In_opt_ PKDPC Dpc
Definition: kefuncs.h:524
_In_ PKSYNCHRONIZE_ROUTINE SynchronizeRoutine
Definition: kefuncs.h:549
LIST_ENTRY List
Definition: psmgr.c:57
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define STATUS_PENDING
Definition: ntstatus.h:82
struct _ACCESS_RANGE * PACCESS_RANGE
BOOLEAN ScatterGather
Definition: iotypes.h:2027
#define IRP_MN_START_DEVICE
PDEVICE_OBJECT PhysicalDeviceObject
Definition: stream.h:28
static const UCHAR Index[8]
Definition: usbohci.c:18
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
struct STREAM_DEVICE_EXTENSION * PSTREAM_DEVICE_EXTENSION
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID ServiceContext
Definition: iofuncs.h:798
DMA_WIDTH DmaWidth
Definition: iotypes.h:2037
PHW_STREAM_DESCRIPTOR StreamDescriptor
Definition: stream.h:43
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
HW_STREAM_REQUEST_BLOCK Block
Definition: stream.h:53
PHW_STREAM_DESCRIPTOR StreamBuffer
Definition: strmini.h:232
Definition: ketypes.h:687
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
PVOID NTAPI IoGetDriverObjectExtension(IN PDRIVER_OBJECT DriverObject, IN PVOID ClientIdentificationAddress)
Definition: driver.c:1842
Definition: typedefs.h:117
Definition: range.c:39
Status
Definition: gdiplustypes.h:24
union _HW_STREAM_REQUEST_BLOCK::_CommandData CommandData
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
#define MAXULONG
Definition: typedefs.h:250
LIST_ENTRY Entry
Definition: stream.h:19
NTSTATUS NTAPI StreamClassAddDevice(IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject)
Definition: driver.c:13
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
_In_ PKSYNCHRONIZE_ROUTINE _In_opt_ __drv_aliasesMem PVOID SynchronizeContext
Definition: kefuncs.h:549
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2745
NTSTATUS NTAPI StreamClassPnp(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: pnp.c:448
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
ULONG_PTR KAFFINITY
Definition: compat.h:75
VOID NTAPI MmUnmapIoSpace(IN PVOID BaseAddress, IN SIZE_T NumberOfBytes)
Definition: iosup.c:193
ULONG StreamDescriptorSize
Definition: stream.h:42
#define CmResourceTypeInterrupt
Definition: hwresource.cpp:124
PDMA_ADAPTER DmaAdapter
Definition: stream.h:33
INTERFACE_TYPE InterfaceType
Definition: iotypes.h:2036
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:409
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:566
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
PSTREAM_CLASS_DRIVER_EXTENSION DriverExtension
Definition: stream.h:44
BOOLEAN NTAPI KeSynchronizeExecution(IN OUT PKINTERRUPT Interrupt, IN PKSYNCHRONIZE_ROUTINE SynchronizeRoutine, IN PVOID SynchronizeContext OPTIONAL)
Definition: interrupt.c:142
SRB_COMMAND Command
Definition: strmini.h:224
PDEVICE_OBJECT LowerDeviceObject
Definition: stream.h:27
LIST_ENTRY MemoryResourceList
Definition: stream.h:40
struct _NAMED_PIPE_CREATE_PARAMETERS * Parameters
Definition: iotypes.h:2772
#define CmResourceTypeMemory
Definition: hwresource.cpp:125
VOID NTAPI KeClearEvent(IN PKEVENT Event)
Definition: eventobj.c:22
return STATUS_SUCCESS
Definition: btrfs.c:2938
PHW_RECEIVE_DEVICE_SRB HwReceivePacket
Definition: strmini.h:356
base of all file and directory entries
Definition: entries.h:82
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
Iosb Information
Definition: create.c:4377
BOOLEAN AutoInitialize
Definition: iotypes.h:2029
#define CmResourceTypeDma
Definition: hwresource.cpp:126
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
_In_ PSTORAGE_PROPERTY_ID _Outptr_ PSTORAGE_DESCRIPTOR_HEADER * Descriptor
Definition: classpnp.h:966
_In_opt_ PVOID DeferredContext
Definition: ketypes.h:675