ReactOS 0.4.17-dev-1190-g4c812f4
pdo.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS PCI Bus Driver
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/bus/pci/pdo.c
5 * PURPOSE: PDO Device Management
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9/* INCLUDES *******************************************************************/
10
11#include <pci.h>
12
13#define NDEBUG
14#include <debug.h>
15
16/* GLOBALS ********************************************************************/
17
19
21C_ASSERT(FIELD_OFFSET(PCI_FDO_EXTENSION, TentativeNextState) == FIELD_OFFSET(PCI_PDO_EXTENSION, TentativeNextState));
23
25{
31};
32
34{
61};
62
64{
73};
74
75/* FUNCTIONS ******************************************************************/
76
77static
81 _Inout_ PPCI_PDO_EXTENSION DeviceExtension,
83
84static IO_WORKITEM_ROUTINE PciPdoDevicePowerWorker;
85
90 IN PPCI_PDO_EXTENSION DeviceExtension)
91{
93 UNREFERENCED_PARAMETER(DeviceExtension);
94
95 /* PME is never armed, so the function cannot wake the system */
96 Irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
100}
101
103NTAPI
106 IN PPCI_PDO_EXTENSION DeviceExtension)
107{
110
111 /* The function driver follows a system state with a device state request of its own */
113 {
114 DeviceExtension->PowerState.CurrentSystemState = State.SystemState;
115 return STATUS_SUCCESS;
116 }
117
118 if ((State.DeviceState < PowerDeviceD0) || (State.DeviceState > PowerDeviceD3))
120
121 if (State.DeviceState == DeviceExtension->PowerState.CurrentDeviceState)
122 return STATUS_SUCCESS;
123
124 /* Configuration cycles cannot reach a function on a bus that is not running */
125 if (DeviceExtension->ParentFdoExtension->DeviceState != PciStarted)
127
129 return PciPdoEnterDevicePowerState(DeviceExtension, State.DeviceState);
130
131 /* D0 may be sent at DISPATCH_LEVEL, and reprogramming the function needs PASSIVE_LEVEL */
132 WorkItem = IoAllocateWorkItem(DeviceExtension->PhysicalDeviceObject);
133 if (!WorkItem)
135
136 Irp->Tail.Overlay.DriverContext[0] = WorkItem;
139 return STATUS_PENDING;
140}
141
143NTAPI
146 IN PPCI_PDO_EXTENSION DeviceExtension)
147{
150 UNREFERENCED_PARAMETER(DeviceExtension);
151
152 /* Every device state is accepted when set, so none is refused here */
153 return STATUS_SUCCESS;
154}
155
157NTAPI
160 IN PPCI_PDO_EXTENSION DeviceExtension)
161{
163 BOOLEAN Changed, DoReset;
165 PAGED_CODE();
166
168
169 DoReset = FALSE;
170
171 /* Begin entering the start phase */
172 Status = PciBeginStateTransition((PVOID)DeviceExtension, PciStarted);
173 if (!NT_SUCCESS(Status)) return Status;
174
175 /* Check if this is a VGA device */
176 if (((DeviceExtension->BaseClass == PCI_CLASS_PRE_20) &&
177 (DeviceExtension->SubClass == PCI_SUBCLASS_PRE_20_VGA)) ||
178 ((DeviceExtension->BaseClass == PCI_CLASS_DISPLAY_CTLR) &&
179 (DeviceExtension->SubClass == PCI_SUBCLASS_VID_VGA_CTLR)))
180 {
181 /* Always force it on */
182 DeviceExtension->CommandEnables |= (PCI_ENABLE_IO_SPACE |
184 }
185
186 /* Check if native IDE is enabled and it owns the I/O ports */
187 if (DeviceExtension->IoSpaceUnderNativeIdeControl)
188 {
189 /* Then don't allow I/O access */
190 DeviceExtension->CommandEnables &= ~PCI_ENABLE_IO_SPACE;
191 }
192
193 /* Always enable bus mastering */
194 DeviceExtension->CommandEnables |= PCI_ENABLE_BUS_MASTER;
195
196 /* Check if the OS assigned resources differ from the PCI configuration */
197 Changed = PciComputeNewCurrentSettings(DeviceExtension,
199 StartDevice.AllocatedResources);
200 if (Changed)
201 {
202 /* Remember this for later */
203 DeviceExtension->MovedDevice = TRUE;
204 }
205 else
206 {
207 /* All good */
208 DPRINT1("PCIX - START not changing resource settings.\n");
209 }
210
211 /* Check if the device was sleeping */
212 if (DeviceExtension->PowerState.CurrentDeviceState != PowerDeviceD0)
213 {
214 /* Power it up */
217 FALSE);
218 if (!NT_SUCCESS(Status))
219 {
220 /* Powerup fail, fail the request */
221 PciCancelStateTransition((PVOID)DeviceExtension, PciStarted);
223 }
224
225 /* Tell the power manager that the device is powered up */
226 PowerState.DeviceState = PowerDeviceD0;
227 PoSetPowerState(DeviceExtension->PhysicalDeviceObject,
229 PowerState);
230
231 /* Update internal state */
232 DeviceExtension->PowerState.CurrentDeviceState = PowerDeviceD0;
233
234 /* This device's resources and decodes will need to be reset */
235 DoReset = TRUE;
236 }
237
238 /* Update resource information now that the device is powered up and active */
239 Status = PciSetResources(DeviceExtension, DoReset, TRUE);
240 if (!NT_SUCCESS(Status))
241 {
242 /* That failed, so cancel the transition */
243 PciCancelStateTransition((PVOID)DeviceExtension, PciStarted);
244 }
245 else
246 {
247 /* Fully commit, as the device is now started up and ready to go */
248 PciCommitStateTransition((PVOID)DeviceExtension, PciStarted);
249 }
250
251 /* Return the result of the start request */
252 return Status;
253}
254
265static
267NTAPI
269 _In_ PPCI_PDO_EXTENSION DeviceExtension)
270{
271 /* Paging, hibernation and dump files, and the debugger, cannot lose their hardware */
272 if ((DeviceExtension->PowerState.Paging) ||
273 (DeviceExtension->PowerState.Hibernate) ||
274 (DeviceExtension->PowerState.CrashDump) ||
275 (DeviceExtension->OnDebugPath))
276 {
277 return STATUS_DEVICE_BUSY;
278 }
279
280 /* A driver that claimed the function outside of PnP will not let go of it */
281 if (DeviceExtension->LegacyDriver)
283
284 return STATUS_SUCCESS;
285}
286
297static
299NTAPI
301 _In_ PPCI_PDO_EXTENSION DeviceExtension)
302{
303 /* Critical functions, VGA, legacy bridges and the debug path keep decoding */
304 return PciCanDisableDecodes(DeviceExtension, NULL, 0, FALSE);
305}
306
317static
319NTAPI
321 _Inout_ PPCI_PDO_EXTENSION DeviceExtension)
322{
323 PCI_COMMON_HEADER PciData;
324
325 if (DeviceExtension->NotPresent)
326 return FALSE;
327
328 PciReadDeviceConfig(DeviceExtension, &PciData, 0, PCI_COMMON_HDR_LENGTH);
329 if (!PcipIsSameDevice(DeviceExtension, &PciData))
330 {
331 DPRINT1("PCIX - pdox %p no longer answers in its slot\n", DeviceExtension);
332 DeviceExtension->NotPresent = TRUE;
333 return FALSE;
334 }
335
336 return TRUE;
337}
338
350static
351VOID
352NTAPI
354 _Inout_ PPCI_PDO_EXTENSION DeviceExtension,
355 _In_ BOOLEAN PowerDown)
356{
359
360 if (!PciPdoCanTurnOff(DeviceExtension))
361 return;
362
363 /* The wired line is masked in the same write that clears the decodes */
364 PciReadDeviceConfig(DeviceExtension,
365 &Command,
367 sizeof(Command));
369 PciDecodeEnable(DeviceExtension, FALSE, &Command);
370
371 if (!PowerDown ||
372 (DeviceExtension->PowerState.CurrentDeviceState == PowerDeviceD3) ||
373 !PciCanDisableDecodes(DeviceExtension, NULL, 0, TRUE))
374 {
375 return;
376 }
377
378 /* Start sees D3, powers the function back up and reprograms it */
380 DeviceExtension->PowerState.CurrentDeviceState = PowerDeviceD3;
381
382 PowerState.DeviceState = PowerDeviceD3;
383 PoSetPowerState(DeviceExtension->PhysicalDeviceObject, DevicePowerState, PowerState);
384}
385
399static
401NTAPI
403 _In_ PPCI_PDO_EXTENSION DeviceExtension,
405{
406 SYSTEM_POWER_STATE SystemState = DeviceExtension->PowerState.CurrentSystemState;
407
408 /* Critical functions, VGA and the debug path keep decoding, so they keep power too */
409 if (!PciPdoCanTurnOff(DeviceExtension))
410 return FALSE;
411
412 /* IDE controllers and legacy bridges stay in D0 */
413 if (!PciCanDisableDecodes(DeviceExtension, NULL, 0, TRUE))
414 return FALSE;
415
416 /* The hibernation file and crash dump are written through this function */
417 if ((SystemState == PowerSystemHibernate) &&
418 (DeviceExtension->PowerState.Hibernate || DeviceExtension->PowerState.CrashDump))
419 {
420 return FALSE;
421 }
422
423 /* On a warm reboot firmware may not power a bridge up again before booting from behind it */
424 if ((SystemState == PowerSystemShutdown) &&
426 (DeviceExtension->BaseClass == PCI_CLASS_BRIDGE_DEV) &&
427 (DeviceExtension->SubClass == PCI_SUBCLASS_BR_PCI_TO_PCI))
428 {
429 return FALSE;
430 }
431
432 return TRUE;
433}
434
448static
450NTAPI
452 _Inout_ PPCI_PDO_EXTENSION DeviceExtension,
454{
457 PAGED_CODE();
458
459 if (DeviceState == DeviceExtension->PowerState.CurrentDeviceState)
460 return STATUS_SUCCESS;
461
462 PowerState.DeviceState = DeviceState;
463
465 {
466 /* After the settle delay this also writes the configuration and interrupt back */
468 if (!NT_SUCCESS(Status))
469 {
470 DPRINT1("PCIX - pdox %p failed to return to D0 (0x%08lx)\n", DeviceExtension, Status);
471 return Status;
472 }
473
474 DeviceExtension->PowerState.CurrentDeviceState = PowerDeviceD0;
475 PoSetPowerState(DeviceExtension->PhysicalDeviceObject, DevicePowerState, PowerState);
476 return STATUS_SUCCESS;
477 }
478
479 /* The power manager learns of a power down before the function loses power */
480 PoSetPowerState(DeviceExtension->PhysicalDeviceObject, DevicePowerState, PowerState);
481
482 if (PciPdoCanPowerDown(DeviceExtension, DeviceState))
483 {
484 PciPdoTurnOff(DeviceExtension, FALSE);
485
487 if (!NT_SUCCESS(Status))
488 {
489 DPRINT1("PCIX - pdox %p did not settle in device state %lu (0x%08lx)\n",
490 DeviceExtension,
492 Status);
493 }
494 }
495
496 /* A function kept running is still reprogrammed by the next D0 */
497 DeviceExtension->PowerState.CurrentDeviceState = DeviceState;
498 return STATUS_SUCCESS;
499}
500
508static
509VOID
510NTAPI
514{
515 PIRP Irp = Context;
518
519 ASSERT(Irp != NULL);
520
521 IoFreeWorkItem(Irp->Tail.Overlay.DriverContext[0]);
522
524 DeviceState = IoStackLocation->Parameters.Power.State.DeviceState;
525
526 Irp->IoStatus.Status = PciPdoEnterDevicePowerState(DeviceObject->DeviceExtension,
530}
531
533NTAPI
536 IN PPCI_PDO_EXTENSION DeviceExtension)
537{
539 PAGED_CODE();
540
543
544 if (DeviceExtension->HackFlags & PCI_HACK_FAIL_QUERY_REMOVE)
545 return STATUS_DEVICE_BUSY;
546
547 Status = PciPdoValidateRelease(DeviceExtension);
548 if (!NT_SUCCESS(Status))
549 return Status;
550
551 /* A function that was never started has no state to leave */
552 if (DeviceExtension->DeviceState == PciNotStarted)
553 return STATUS_SUCCESS;
554
555 return PciBeginStateTransition((PVOID)DeviceExtension, PciNotStarted);
556}
557
559NTAPI
562 IN PPCI_PDO_EXTENSION DeviceExtension)
563{
564 PAGED_CODE();
565
568
569 if (PciPdoIsPresent(DeviceExtension))
570 PciPdoTurnOff(DeviceExtension, TRUE);
571
572 /* A remove without a query still has to take a started function out of that state */
573 if ((DeviceExtension->DeviceState == PciStarted) &&
574 (DeviceExtension->TentativeNextState == PciStarted))
575 {
577 }
578
579 if ((DeviceExtension->DeviceState != PciNotStarted) &&
580 (DeviceExtension->TentativeNextState == PciNotStarted))
581 {
583 }
584
585 /* A function that left the bus will not come back through this PDO */
586 if ((DeviceExtension->ReportedMissing) &&
588 {
589 PciCommitStateTransition((PVOID)DeviceExtension, PciDeleted);
590 }
591
592 return STATUS_SUCCESS;
593}
594
596NTAPI
599 IN PPCI_PDO_EXTENSION DeviceExtension)
600{
601 PAGED_CODE();
602
605
606 /* The remove is off, so the device stays where it was */
608 return STATUS_SUCCESS;
609}
610
612NTAPI
615 IN PPCI_PDO_EXTENSION DeviceExtension)
616{
617 PAGED_CODE();
618
621
622 /* The device is losing its resources, so it must stop using them first */
623 PciPdoTurnOff(DeviceExtension, FALSE);
624
625 /* The query stop that has to come first already began the transition */
626 PciCommitStateTransition((PVOID)DeviceExtension, PciStopped);
627 return STATUS_SUCCESS;
628}
629
631NTAPI
634 IN PPCI_PDO_EXTENSION DeviceExtension)
635{
637 PAGED_CODE();
638
641
642 Status = PciPdoValidateRelease(DeviceExtension);
643 if (!NT_SUCCESS(Status))
644 return Status;
645
646 /* New resources are useless if the old ranges keep decoding */
647 if (!PciPdoCanTurnOff(DeviceExtension))
649
650 return PciBeginStateTransition((PVOID)DeviceExtension, PciStopped);
651}
652
654NTAPI
657 IN PPCI_PDO_EXTENSION DeviceExtension)
658{
659 PAGED_CODE();
660
663
664 /* The stop is off, so the device keeps what it has */
665 PciCancelStateTransition((PVOID)DeviceExtension, PciStopped);
666 return STATUS_SUCCESS;
667}
668
670NTAPI
673 IN PPCI_PDO_EXTENSION DeviceExtension)
674{
676 PAGED_CODE();
677
679
680 /* Query the interface from the PCI driver */
682 (PPCI_FDO_EXTENSION)DeviceExtension,
686 IoStackLocation->Parameters.QueryInterface.InterfaceSpecificData,
688 FALSE);
689
690 /* TODO: There's more to this story, but NOT TODAY! */
691
692 return Status;
693}
694
696NTAPI
699 IN PPCI_PDO_EXTENSION DeviceExtension)
700{
702 PAGED_CODE();
703
704 /* Are ejection relations being queried? */
706 {
707 /* Call the worker function */
708 Status = PciQueryEjectionRelations(DeviceExtension,
710 IoStatus.Information);
711 }
713 {
714 /* The only other relation supported is the target device relation */
715 Status = PciQueryTargetDeviceRelations(DeviceExtension,
717 IoStatus.Information);
718 }
719 else
720 {
721 /* All other relations are unsupported */
723 }
724
725 /* Return either the result of the worker function, or unsupported status */
726 return Status;
727}
728
730NTAPI
733 IN PPCI_PDO_EXTENSION DeviceExtension)
734{
735 PAGED_CODE();
736
738
739 /* Call the worker function */
740 return PciQueryCapabilities(DeviceExtension,
742 Parameters.DeviceCapabilities.Capabilities);
743}
744
746NTAPI
749 IN PPCI_PDO_EXTENSION DeviceExtension)
750{
751 PAGED_CODE();
752
754
755 /* Call the worker function */
756 return PciQueryResources(DeviceExtension,
757 (PCM_RESOURCE_LIST*)&Irp->IoStatus.Information);
758}
759
761NTAPI
764 IN PPCI_PDO_EXTENSION DeviceExtension)
765{
766 PAGED_CODE();
767
769
770 /* Call the worker function */
771 return PciQueryRequirements(DeviceExtension,
773 IoStatus.Information);
774}
775
777NTAPI
780 IN PPCI_PDO_EXTENSION DeviceExtension)
781{
782 PAGED_CODE();
783
784 /* Call the worker function */
785 return PciQueryDeviceText(DeviceExtension,
787 Parameters.QueryDeviceText.DeviceTextType,
790 (PWCHAR*)&Irp->IoStatus.Information);
791}
792
794NTAPI
797 IN PPCI_PDO_EXTENSION DeviceExtension)
798{
799 PAGED_CODE();
800
801 /* Call the worker function */
802 return PciQueryId(DeviceExtension,
804 (PWCHAR*)&Irp->IoStatus.Information);
805}
806
808NTAPI
811 IN PPCI_PDO_EXTENSION DeviceExtension)
812{
813 PAGED_CODE();
814
816
817 /* Call the worker function */
818 return PciQueryBusInformation(DeviceExtension,
820 IoStatus.Information);
821}
822
833static
835NTAPI
839 _In_ PPCI_PDO_EXTENSION DeviceExtension,
841{
842 PUCHAR Bounce;
843 ULONG Offset, Length, End, Limit, LineOffset;
844 BOOLEAN CoversLine;
845 PAGED_CODE();
846
847 Irp->IoStatus.Information = 0;
848
849 /* No ROM image is kept, and a ROM can never be written */
852
853 /* Any other space value is taken as configuration space */
856
857 End = Offset + Length;
858 if (End < Offset)
860
861 Limit = DeviceExtension->IsExtendedConfigReachable ? PCI_EXTENDED_CONFIG_LENGTH :
863 if (End > Limit)
865
866 if (!Length)
867 return STATUS_SUCCESS;
868
869 /* The caller's buffer may be pageable, and config cycles run at raised IRQL */
871 if (!Bounce)
873
874 LineOffset = FIELD_OFFSET(PCI_COMMON_HEADER, u.type0.InterruptLine);
875 CoversLine = (DeviceExtension->InterruptPin != 0) &&
876 (LineOffset >= Offset) &&
877 (LineOffset < End);
878
879 if (Read)
880 {
881 PciReadDeviceConfig(DeviceExtension, Bounce, Offset, Length);
882
883 /* Drivers see the line they were assigned */
884 if (CoversLine)
885 Bounce[LineOffset - Offset] = DeviceExtension->AdjustedInterruptLine;
886
888 }
889 else
890 {
892
893 /* The register keeps its firmware value */
894 if (CoversLine)
895 Bounce[LineOffset - Offset] = DeviceExtension->RawInterruptLine;
896
897 PciWriteDeviceConfig(DeviceExtension, Bounce, Offset, Length);
898 }
899
901
902 Irp->IoStatus.Information = Length;
903 return STATUS_SUCCESS;
904}
905
907NTAPI
910 IN PPCI_PDO_EXTENSION DeviceExtension)
911{
912 PAGED_CODE();
913
914 return PciPdoReadWriteConfig(Irp, IoStackLocation, DeviceExtension, TRUE);
915}
916
918NTAPI
921 IN PPCI_PDO_EXTENSION DeviceExtension)
922{
923 PAGED_CODE();
924
925 return PciPdoReadWriteConfig(Irp, IoStackLocation, DeviceExtension, FALSE);
926}
927
929NTAPI
932 IN PPCI_PDO_EXTENSION DeviceExtension)
933{
935 PAGED_CODE();
936
938
939 /* Whatever the rest of the stack decided about this device still holds */
940 State = (PNP_DEVICE_STATE)Irp->IoStatus.Information;
941
942 /* Host bridges, and anything a query remove would refuse, must not be offered for disabling */
943 if (((DeviceExtension->BaseClass == PCI_CLASS_BRIDGE_DEV) &&
944 (DeviceExtension->SubClass == PCI_SUBCLASS_BR_HOST)) ||
945 (!NT_SUCCESS(PciPdoValidateRelease(DeviceExtension))))
946 {
948 }
949
950 Irp->IoStatus.Information = State;
951 return STATUS_SUCCESS;
952}
953
955NTAPI
958 IN PPCI_PDO_EXTENSION DeviceExtension)
959{
961 PAGED_CODE();
962
964
965 /* Every bus up to the root has to hold on to the path, so it goes up first */
966 Status = PciSendDeviceUsageToParent(DeviceExtension->ParentFdoExtension,
968 if (!NT_SUCCESS(Status))
969 return Status;
970
971 return PciUpdateDeviceUsage(&DeviceExtension->PowerState, IoStackLocation);
972}
973
975NTAPI
978 IN PPCI_PDO_EXTENSION DeviceExtension)
979{
980 PAGED_CODE();
981
984
985 /* This also comes after a failed start, with the function still in its slot */
986 if (PciPdoIsPresent(DeviceExtension))
987 PciPdoTurnOff(DeviceExtension, TRUE);
988
989 if (DeviceExtension->ReportedMissing)
990 {
991 /* The slot is empty, so only the remove is left to come */
994 }
995 else if (DeviceExtension->DeviceState != PciNotStarted)
996 {
997 /* The remove that follows commits this */
999 }
1000
1001 return STATUS_SUCCESS;
1002}
1003
1005NTAPI
1008 IN PPCI_PDO_EXTENSION DeviceExtension)
1009{
1010 PAGED_CODE();
1011
1014 UNREFERENCED_PARAMETER(DeviceExtension);
1015
1016 /* A bridge's FDO answers above this, so keep its bus number and buffer intact */
1017 return STATUS_NOT_SUPPORTED;
1018}
1019
1021NTAPI
1023 IN PCI_SLOT_NUMBER Slot,
1025{
1026 WCHAR DeviceName[32];
1027 UNICODE_STRING DeviceString;
1031 ULONG SequenceNumber;
1032 PAGED_CODE();
1033
1034 /* Pick an atomically unique sequence number for this device */
1035 SequenceNumber = InterlockedIncrement(&PciPdoSequenceNumber);
1036
1037 /* Create the standard PCI device name for a PDO */
1038 _swprintf(DeviceName, L"\\Device\\NTPNP_PCI%04d", SequenceNumber);
1039 RtlInitUnicodeString(&DeviceString, DeviceName);
1040
1041 /* Create the actual device now */
1042 Status = IoCreateDevice(DeviceExtension->FunctionalDeviceObject->DriverObject,
1043 sizeof(PCI_PDO_EXTENSION),
1044 &DeviceString,
1046 0,
1047 0,
1048 &DeviceObject);
1050
1051 /* Get the extension for it */
1052 PdoExtension = (PPCI_PDO_EXTENSION)DeviceObject->DeviceExtension;
1053 DPRINT1("PCIX - New PDO (b=0x%x, d=0x%x, f=0x%x) @ %p, ext @ %p\n",
1054 DeviceExtension->BaseBus,
1055 Slot.u.bits.DeviceNumber,
1056 Slot.u.bits.FunctionNumber,
1058 DeviceObject->DeviceExtension);
1059
1060 /* Configure the extension */
1061 PdoExtension->ExtensionType = PciPdoExtensionType;
1062 PdoExtension->IrpDispatchTable = &PciPdoDispatchTable;
1063 PdoExtension->PhysicalDeviceObject = DeviceObject;
1064 PdoExtension->Slot = Slot;
1065 PdoExtension->PowerState.CurrentSystemState = PowerSystemWorking;
1066 PdoExtension->PowerState.CurrentDeviceState = PowerDeviceD0;
1067 PdoExtension->ParentFdoExtension = DeviceExtension;
1068
1069 /* Initialize the lock for arbiters and other interfaces */
1071
1072 /* Initialize the state machine */
1074
1075 /* Add the PDO to the parent's list */
1076 PdoExtension->Next = NULL;
1077 PciInsertEntryAtTail((PSINGLE_LIST_ENTRY)&DeviceExtension->ChildPdoList,
1079 &DeviceExtension->ChildListLock);
1080
1081 /* And finally return it to the caller */
1083 return STATUS_SUCCESS;
1084}
1085
1086/* EOF */
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define PAGED_CODE()
unsigned char BOOLEAN
Definition: actypes.h:127
#define InterlockedIncrement
Definition: armddk.h:53
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define STATUS_INTEGER_OVERFLOW
Definition: log.c:20
static VOID NTAPI PciPdoTurnOff(_Inout_ PPCI_PDO_EXTENSION DeviceExtension, _In_ BOOLEAN PowerDown)
Stops a function from decoding, mastering and raising interrupts, and optionally moves it to D3.
Definition: pdo.c:353
NTSTATUS NTAPI PciPdoCreate(IN PPCI_FDO_EXTENSION DeviceExtension, IN PCI_SLOT_NUMBER Slot, OUT PDEVICE_OBJECT *PdoDeviceObject)
Definition: pdo.c:1022
NTSTATUS NTAPI PciPdoIrpStopDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:613
PCI_MN_DISPATCH_TABLE PciPdoDispatchPowerTable[]
Definition: pdo.c:24
NTSTATUS NTAPI PciPdoSetPowerState(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:104
NTSTATUS NTAPI PciPdoIrpCancelStopDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:655
static BOOLEAN NTAPI PciPdoCanPowerDown(_In_ PPCI_PDO_EXTENSION DeviceExtension, _In_ DEVICE_POWER_STATE DeviceState)
Checks whether a request for a low power device state may take power from a function.
Definition: pdo.c:402
PCI_MJ_DISPATCH_TABLE PciPdoDispatchTable
Definition: pdo.c:63
NTSTATUS NTAPI PciPdoIrpSurpriseRemoval(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:976
NTSTATUS NTAPI PciPdoIrpQueryInterface(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:671
static NTSTATUS NTAPI PciPdoValidateRelease(_In_ PPCI_PDO_EXTENSION DeviceExtension)
Checks the uses of a function that keep it from being stopped or removed.
Definition: pdo.c:268
static BOOLEAN NTAPI PciPdoIsPresent(_Inout_ PPCI_PDO_EXTENSION DeviceExtension)
Reads the identity back from the slot to learn whether the function is still there.
Definition: pdo.c:320
NTSTATUS NTAPI PciPdoIrpQueryResourceRequirements(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:762
LONG PciPdoSequenceNumber
Definition: pdo.c:18
NTSTATUS NTAPI PciPdoIrpQueryDeviceText(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:778
static BOOLEAN NTAPI PciPdoCanTurnOff(_In_ PPCI_PDO_EXTENSION DeviceExtension)
Checks whether a function may stop decoding for as long as it is stopped or removed.
Definition: pdo.c:300
NTSTATUS NTAPI PciPdoIrpCancelRemoveDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:597
static NTSTATUS NTAPI PciPdoReadWriteConfig(_Inout_ PIRP Irp, _In_ PIO_STACK_LOCATION IoStackLocation, _In_ PPCI_PDO_EXTENSION DeviceExtension, _In_ BOOLEAN Read)
Serves a driver's read or write of its own function's configuration space.
Definition: pdo.c:836
NTSTATUS NTAPI PciPdoIrpQueryDeviceState(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:930
NTSTATUS NTAPI PciPdoIrpReadConfig(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:908
NTSTATUS NTAPI PciPdoIrpQueryLegacyBusInformation(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:1006
NTSTATUS NTAPI PciPdoIrpRemoveDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:560
NTSTATUS NTAPI PciPdoIrpQueryId(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:795
NTSTATUS NTAPI PciPdoIrpQueryPower(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:144
NTSTATUS NTAPI PciPdoIrpQueryDeviceRelations(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:697
NTSTATUS NTAPI PciPdoIrpWriteConfig(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:919
PCI_MN_DISPATCH_TABLE PciPdoDispatchPnpTable[]
Definition: pdo.c:33
NTSTATUS NTAPI PciPdoIrpQueryCapabilities(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:731
NTSTATUS NTAPI PciPdoIrpStartDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:158
NTSTATUS NTAPI PciPdoIrpQueryRemoveDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:534
static IO_WORKITEM_ROUTINE PciPdoDevicePowerWorker
Definition: pdo.c:84
NTSTATUS NTAPI PciPdoIrpDeviceUsageNotification(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:956
NTSTATUS NTAPI PciPdoIrpQueryStopDevice(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:632
NTSTATUS NTAPI PciPdoIrpQueryResources(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:747
NTSTATUS NTAPI PciPdoWaitWake(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:88
NTSTATUS NTAPI PciPdoIrpQueryBusInformation(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_PDO_EXTENSION DeviceExtension)
Definition: pdo.c:809
static NTSTATUS NTAPI PciPdoEnterDevicePowerState(_Inout_ PPCI_PDO_EXTENSION DeviceExtension, _In_ DEVICE_POWER_STATE DeviceState)
Moves a function to a device power state and reports it to the power manager.
Definition: pdo.c:451
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
_In_ HANDLE _In_ CONST PDXGKMDT_OPM_GET_INFO_PARAMETERS Parameters
Definition: dispmprt.h:321
_Check_return_ _In_ ULONG _In_ DEVICE_POWER_STATE DevicePowerState
Definition: dispmprt.h:1274
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define L(x)
Definition: resources.c:13
NTSTATUS NTAPI PciIrpNotSupported(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_FDO_EXTENSION DeviceExtension)
Definition: dispatch.c:261
NTSTATUS NTAPI PciIrpInvalidDeviceRequest(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PPCI_FDO_EXTENSION DeviceExtension)
Definition: dispatch.c:277
NTSTATUS NTAPI PciSetResources(IN PPCI_PDO_EXTENSION PdoExtension, IN BOOLEAN DoReset, IN BOOLEAN SomethingSomethingDarkSide)
Definition: enum.c:2490
BOOLEAN NTAPI PcipIsSameDevice(IN PPCI_PDO_EXTENSION DeviceExtension, IN PPCI_COMMON_HEADER PciData)
Definition: enum.c:1333
NTSTATUS NTAPI PciQueryEjectionRelations(IN PPCI_PDO_EXTENSION PdoExtension, IN OUT PDEVICE_RELATIONS *pDeviceRelations)
Definition: enum.c:614
NTSTATUS NTAPI PciQueryRequirements(IN PPCI_PDO_EXTENSION PdoExtension, IN OUT PIO_RESOURCE_REQUIREMENTS_LIST *RequirementsList)
Definition: enum.c:882
NTSTATUS NTAPI PciQueryTargetDeviceRelations(IN PPCI_PDO_EXTENSION PdoExtension, IN OUT PDEVICE_RELATIONS *pDeviceRelations)
Definition: enum.c:552
BOOLEAN NTAPI PciComputeNewCurrentSettings(IN PPCI_PDO_EXTENSION PdoExtension, IN PCM_RESOURCE_LIST ResourceList)
Definition: enum.c:55
NTSTATUS NTAPI PciQueryResources(IN PPCI_PDO_EXTENSION PdoExtension, OUT PCM_RESOURCE_LIST *Buffer)
Definition: enum.c:389
VOID NTAPI PciWriteDeviceConfig(IN PPCI_PDO_EXTENSION DeviceExtension, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: config.c:133
VOID NTAPI PciInsertEntryAtTail(IN PSINGLE_LIST_ENTRY ListHead, IN PPCI_FDO_EXTENSION DeviceExtension, IN PKEVENT Lock)
Definition: utils.c:400
NTSTATUS NTAPI PciQueryBusInformation(IN PPCI_PDO_EXTENSION PdoExtension, OUT PPNP_BUS_INFORMATION *Buffer)
Definition: utils.c:1408
@ PciSurpriseRemoved
Definition: pci.h:172
@ PciDeleted
Definition: pci.h:170
@ PciStarted
Definition: pci.h:169
@ PciStopped
Definition: pci.h:171
@ PciNotStarted
Definition: pci.h:168
NTSTATUS NTAPI PciQueryId(IN PPCI_PDO_EXTENSION DeviceExtension, IN BUS_QUERY_ID_TYPE QueryType, OUT PWCHAR *Buffer)
Definition: id.c:217
NTSTATUS NTAPI PciSendDeviceUsageToParent(_In_ PPCI_FDO_EXTENSION ParentFdoExtension, _In_ PIO_STACK_LOCATION IoStackLocation)
Sends a device usage notification to the top of the stack of a parent bus.
Definition: usage.c:94
struct _PCI_PDO_EXTENSION * PPCI_PDO_EXTENSION
NTSTATUS NTAPI PciCancelStateTransition(IN PPCI_FDO_EXTENSION DeviceExtension, IN PCI_STATE NewState)
Definition: state.c:145
NTSTATUS NTAPI PciQueryCapabilities(IN PPCI_PDO_EXTENSION PdoExtension, IN OUT PDEVICE_CAPABILITIES DeviceCapability)
Definition: utils.c:1820
NTSTATUS NTAPI PciBeginStateTransition(IN PPCI_FDO_EXTENSION DeviceExtension, IN PCI_STATE NewState)
Definition: state.c:97
@ IRP_COMPLETE
Definition: pci.h:182
@ IRP_DISPATCH
Definition: pci.h:185
NTSTATUS NTAPI PciQueryDeviceText(IN PPCI_PDO_EXTENSION PdoExtension, IN DEVICE_TEXT_TYPE QueryType, IN ULONG Locale, OUT PWCHAR *Buffer)
Definition: id.c:422
NTSTATUS(NTAPI * PCI_DISPATCH_FUNCTION)(IN PIRP Irp, IN PIO_STACK_LOCATION IoStackLocation, IN PVOID DeviceExtension)
Definition: pci.h:390
VOID NTAPI PciDecodeEnable(IN PPCI_PDO_EXTENSION PdoExtension, IN BOOLEAN Enable, OUT PUSHORT Command)
Definition: utils.c:1359
#define PCI_LEGACY_CONFIG_LENGTH
Definition: pci.h:87
NTSTATUS NTAPI PciSetPowerManagedDevicePowerState(IN PPCI_PDO_EXTENSION DeviceExtension, IN DEVICE_POWER_STATE DeviceState, IN BOOLEAN IrpSet)
Definition: power.c:123
BOOLEAN NTAPI PciCanDisableDecodes(IN PPCI_PDO_EXTENSION DeviceExtension, IN PPCI_COMMON_HEADER Config, IN ULONGLONG HackFlags, IN BOOLEAN ForPowerDown)
Definition: utils.c:1027
NTSTATUS NTAPI PciUpdateDeviceUsage(_Inout_ PPCI_POWER_STATE PowerState, _In_ PIO_STACK_LOCATION IoStackLocation)
Counts a paging, hibernation or dump file arriving on or leaving a device.
Definition: usage.c:35
#define PCI_POOL_TAG
Definition: pci.h:27
VOID NTAPI PciCommitStateTransition(IN PPCI_FDO_EXTENSION DeviceExtension, IN PCI_STATE NewState)
Definition: state.c:181
VOID NTAPI PciInitializeState(IN PPCI_FDO_EXTENSION DeviceExtension)
Definition: state.c:88
VOID NTAPI PciReadDeviceConfig(IN PPCI_PDO_EXTENSION DeviceExtension, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: config.c:149
@ PciPdoExtensionType
Definition: pci.h:133
@ PdoExtension
Definition: precomp.h:61
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define NonPagedPool
Definition: env_spec_w32.h:307
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
Status
Definition: gdiplustypes.h:24
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
_Outptr_ PUSB_DEVICE_HANDLE _In_ PUSB_DEVICE_HANDLE _In_ USHORT _In_ PUSB_PORT_PATH _Out_ PUSB_CD_ERROR_INFORMATION _In_ USHORT _In_ PDEVICE_OBJECT PdoDeviceObject
Definition: hubbusif.h:95
_In_opt_ PVOID _In_ PUCXHUB_WORKITEM WorkItem
Definition: hubucx.h:227
NTSTATUS NTAPI PciQueryInterface(IN PPCI_FDO_EXTENSION DeviceExtension, IN CONST GUID *InterfaceType, IN ULONG Size, IN ULONG Version, IN PVOID InterfaceData, IN PINTERFACE Interface, IN BOOLEAN LastChance)
Definition: intrface.c:45
#define C_ASSERT(e)
Definition: intsafe.h:73
VOID NTAPI IoQueueWorkItem(IN PIO_WORKITEM IoWorkItem, IN PIO_WORKITEM_ROUTINE WorkerRoutine, IN WORK_QUEUE_TYPE QueueType, IN PVOID Context)
Definition: iowork.c:40
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
Definition: iowork.c:75
IoMarkIrpPending(Irp)
_In_ PIRP Irp
Definition: kse.h:79
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define _swprintf(buf, format,...)
Definition: sprintf.c:56
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
Definition: mxum.h:159
static BOOL StartDevice(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, IN DWORD HardwareProfile OPTIONAL, OUT BOOL *bNeedReboot OPTIONAL)
Definition: wizard.c:173
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
@ SynchronizationEvent
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1038
#define IoCompleteRequest
Definition: irp.c:1272
POWER_STATE NTAPI PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, IN POWER_STATE_TYPE Type, IN POWER_STATE State)
Definition: power.c:729
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
Definition: power.c:758
@ PowerSystemShutdown
Definition: ntpoapi.h:41
@ PowerSystemWorking
Definition: ntpoapi.h:36
@ PowerSystemHibernate
Definition: ntpoapi.h:40
@ PowerDeviceD0
Definition: ntpoapi.h:49
@ PowerDeviceD3
Definition: ntpoapi.h:52
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
#define STATUS_DEVICE_POWER_FAILURE
Definition: ntstatus.h:488
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define FILE_DEVICE_BUS_EXTENDER
Definition: winioctl.h:87
#define PCI_HACK_FAIL_QUERY_REMOVE
Definition: pci.h:47
#define STATUS_SUCCESS
Definition: shellext.h:65
STDMETHOD() Next(THIS_ ULONG celt, IAssociationElement *pElement, ULONG *pceltFetched) PURE
_In_ BOOLEAN Read
Definition: strmini.h:479
Definition: shell.h:41
struct _IO_STACK_LOCATION::@5020::@5051 QueryId
struct _IO_STACK_LOCATION::@5020::@5045 QueryDeviceRelations
struct _IO_STACK_LOCATION::@5020::@5049 ReadWriteConfig
struct _IO_STACK_LOCATION::@5020::@5047 DeviceCapabilities
union _IO_STACK_LOCATION::@1814 Parameters
struct _IO_STACK_LOCATION::@5020::@5056 Power
struct _IO_STACK_LOCATION::@5020::@5052 QueryDeviceText
struct _IO_STACK_LOCATION::@5020::@5046 QueryInterface
Definition: ntbasedef.h:640
#define STATUS_PENDING
Definition: telnetd.h:14
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NTAPI
Definition: typedefs.h:36
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define IN
Definition: typedefs.h:39
uint16_t * PWCHAR
Definition: typedefs.h:56
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
#define STATUS_DEVICE_BUSY
Definition: udferr_usr.h:129
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ PIO_STACK_LOCATION IoStackLocation
Definition: usbdlib.h:292
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
_In_ WDFDEVICE _Out_ PWDF_DEVICE_STATE DeviceState
Definition: wdfdevice.h:2005
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3040
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_opt_ PCUNICODE_STRING DeviceName
Definition: wdfdevice.h:3281
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
@ DelayedWorkQueue
Definition: extypes.h:190
@ EjectionRelations
Definition: iotypes.h:2155
@ TargetDeviceRelation
Definition: iotypes.h:2158
#define PNP_DEVICE_NOT_DISABLEABLE
Definition: iotypes.h:1006
#define PCI_ENABLE_BUS_MASTER
Definition: iotypes.h:3633
#define IO_NO_INCREMENT
Definition: iotypes.h:598
#define PCI_SUBCLASS_BR_HOST
Definition: iotypes.h:4177
#define PCI_WHICHSPACE_ROM
Definition: iotypes.h:3660
ULONG PNP_DEVICE_STATE
Definition: iotypes.h:997
#define PCI_ENABLE_IO_SPACE
Definition: iotypes.h:3631
#define PCI_SUBCLASS_BR_PCI_TO_PCI
Definition: iotypes.h:4181
#define PCI_ENABLE_MEMORY_SPACE
Definition: iotypes.h:3632
#define PCI_EXTENDED_CONFIG_LENGTH
Definition: iotypes.h:3611
#define PCI_COMMON_HDR_LENGTH
Definition: iotypes.h:3609
#define PCI_CLASS_BRIDGE_DEV
Definition: iotypes.h:4124
#define PCI_CLASS_PRE_20
Definition: iotypes.h:4118
#define PCI_SUBCLASS_VID_VGA_CTLR
Definition: iotypes.h:4160
#define PCI_DISABLE_LEVEL_INTERRUPT
Definition: iotypes.h:3641
#define PCI_SUBCLASS_PRE_20_VGA
Definition: iotypes.h:4140
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7535
#define PCI_CLASS_DISPLAY_CTLR
Definition: iotypes.h:4121
#define IRP_MN_QUERY_POWER
#define IRP_MN_QUERY_LEGACY_BUS_INFORMATION
Definition: iotypes.h:4443
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:304