Implement InterfacePciDevicePresent(Ex) of PCI_DEVICE_PRESENT_INTERFACE
[reactos.git] / reactos / drivers / bus / pci / fdo.c
index e006907..d4c9fec 100644 (file)
@@ -125,7 +125,7 @@ FdoEnumerateDevices(
       Status = FdoLocateChildDevice(&Device, DeviceExtension, SlotNumber, &PciConfig);
       if (!NT_SUCCESS(Status))
       {
       Status = FdoLocateChildDevice(&Device, DeviceExtension, SlotNumber, &PciConfig);
       if (!NT_SUCCESS(Status))
       {
-        Device = (PPCI_DEVICE)ExAllocatePool(PagedPool, sizeof(PCI_DEVICE));
+        Device = (PPCI_DEVICE)ExAllocatePool(NonPagedPool, sizeof(PCI_DEVICE));
         if (!Device)
         {
           /* FIXME: Cleanup resources for already discovered devices */
         if (!Device)
         {
           /* FIXME: Cleanup resources for already discovered devices */
@@ -413,6 +413,11 @@ FdoStartDevice(
   DeviceExtension->DeviceListCount = 0;
   DeviceExtension->State = dsStarted;
 
   DeviceExtension->DeviceListCount = 0;
   DeviceExtension->State = dsStarted;
 
+  ExInterlockedInsertTailList(
+    &DriverExtension->BusListHead,
+    &DeviceExtension->ListEntry,
+    &DriverExtension->BusListLock);
+
   Irp->IoStatus.Information = 0;
 
   return STATUS_SUCCESS;
   Irp->IoStatus.Information = 0;
 
   return STATUS_SUCCESS;