X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fio%2Fpnpmgr%2Fpnpreport.c;h=f69bce0272124d24a88d67f3b7cdc8e7908109c5;hp=4995b16fd6502a8e137ab1b6c3a6b839c95c98d6;hb=a31725e572e775f05e811aa9f6744e8f6021d010;hpb=577625f6f8dcc2bb20a2e00a24b5ebd3a5a94dea;ds=sidebyside diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c index 4995b16fd65..f69bce02721 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpreport.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpreport.c @@ -18,28 +18,14 @@ IopCreateDeviceKeyPath(IN PCUNICODE_STRING RegistryPath, IN ULONG CreateOptions, OUT PHANDLE Handle); -NTSTATUS -IopAssignDeviceResources( - IN PDEVICE_NODE DeviceNode, - OUT ULONG *pRequiredSize); - NTSTATUS IopSetDeviceInstanceData(HANDLE InstanceKey, PDEVICE_NODE DeviceNode); -NTSTATUS -IopTranslateDeviceResources( - IN PDEVICE_NODE DeviceNode, - IN ULONG RequiredSize); - NTSTATUS IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, PVOID Context); -NTSTATUS -IopUpdateResourceMapForPnPDevice( - IN PDEVICE_NODE DeviceNode); - NTSTATUS IopDetectResourceConflict( IN PCM_RESOURCE_LIST ResourceList); @@ -189,6 +175,11 @@ IoReportDetectedDevice(IN PDRIVER_OBJECT DriverObject, /* We don't send IRP_MN_START_DEVICE */ IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED); + /* We need to get device IDs */ +#if 0 + IopDeviceNodeSetFlag(DeviceNode, DNF_NEED_QUERY_IDS); +#endif + /* This is a legacy driver for this device */ IopDeviceNodeSetFlag(DeviceNode, DNF_LEGACY_DRIVER); @@ -258,9 +249,7 @@ IoReportDetectedDevice(IN PDRIVER_OBJECT DriverObject, if (DeviceNode->BootResources) IopDeviceNodeSetFlag(DeviceNode, DNF_HAS_BOOT_CONFIG); - if (DeviceNode->ResourceRequirements) - IopDeviceNodeSetFlag(DeviceNode, DNF_RESOURCE_REPORTED); - else + if (!DeviceNode->ResourceRequirements && !DeviceNode->BootResources) IopDeviceNodeSetFlag(DeviceNode, DNF_NO_RESOURCE_REQUIRED); /* Write the resource information to the registry */ @@ -269,27 +258,7 @@ IoReportDetectedDevice(IN PDRIVER_OBJECT DriverObject, /* If the caller didn't get the resources assigned for us, do it now */ if (!ResourceAssigned) { - IopDeviceNodeSetFlag(DeviceNode, DNF_ASSIGNING_RESOURCES); - Status = IopAssignDeviceResources(DeviceNode, &RequiredLength); - if (NT_SUCCESS(Status)) - { - Status = IopTranslateDeviceResources(DeviceNode, RequiredLength); - if (NT_SUCCESS(Status)) - { - Status = IopUpdateResourceMapForPnPDevice(DeviceNode); - if (NT_SUCCESS(Status) && DeviceNode->ResourceList) - { - RtlInitUnicodeString(&ValueName, L"AllocConfig"); - Status = ZwSetValueKey(InstanceKey, - &ValueName, - 0, - REG_RESOURCE_LIST, - DeviceNode->ResourceList, - CM_RESOURCE_LIST_SIZE(DeviceNode->ResourceList)); - } - } - } - IopDeviceNodeClearFlag(DeviceNode, DNF_ASSIGNING_RESOURCES); + Status = IopAssignDeviceResources(DeviceNode); /* See if we failed */ if (!NT_SUCCESS(Status))