mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[NTOSKRNL]
- Handle devices that are run by their own bus drivers - This could be done a bit nicer but it works svn path=/trunk/; revision=46431
This commit is contained in:
parent
0bd14e99b4
commit
67c1ce90bd
1 changed files with 20 additions and 2 deletions
|
@ -1847,6 +1847,7 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode,
|
||||||
PUNICODE_STRING Service;
|
PUNICODE_STRING Service;
|
||||||
UNICODE_STRING ClassGUID;
|
UNICODE_STRING ClassGUID;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
DEVICE_CAPABILITIES DeviceCaps;
|
||||||
|
|
||||||
DPRINT("IopActionConfigureChildServices(%p, %p)\n", DeviceNode, Context);
|
DPRINT("IopActionConfigureChildServices(%p, %p)\n", DeviceNode, Context);
|
||||||
|
|
||||||
|
@ -1920,9 +1921,22 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode,
|
||||||
|
|
||||||
if (Service->Buffer == NULL)
|
if (Service->Buffer == NULL)
|
||||||
{
|
{
|
||||||
IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED);
|
if (NT_SUCCESS(IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps)) &&
|
||||||
|
DeviceCaps.RawDeviceOK)
|
||||||
|
{
|
||||||
|
DPRINT1("%wZ is using parent bus driver (%wZ)\n", &DeviceNode->InstancePath, &ParentDeviceNode->ServiceName);
|
||||||
|
|
||||||
if (ClassGUID.Length != 0)
|
DeviceNode->ServiceName.Length = 0;
|
||||||
|
DeviceNode->ServiceName.MaximumLength = ParentDeviceNode->ServiceName.MaximumLength;
|
||||||
|
DeviceNode->ServiceName.Buffer = ExAllocatePool(PagedPool, DeviceNode->ServiceName.MaximumLength);
|
||||||
|
if (!DeviceNode->ServiceName.Buffer)
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
|
||||||
|
RtlCopyUnicodeString(&DeviceNode->ServiceName, &ParentDeviceNode->ServiceName);
|
||||||
|
|
||||||
|
IopDeviceNodeSetFlag(DeviceNode, DNF_LEGACY_DRIVER);
|
||||||
|
}
|
||||||
|
else if (ClassGUID.Length != 0)
|
||||||
{
|
{
|
||||||
/* Device has a ClassGUID value, but no Service value.
|
/* Device has a ClassGUID value, but no Service value.
|
||||||
* Suppose it is using the NULL driver, so state the
|
* Suppose it is using the NULL driver, so state the
|
||||||
|
@ -1930,6 +1944,10 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode,
|
||||||
DPRINT1("%wZ is using NULL driver\n", &DeviceNode->InstancePath);
|
DPRINT1("%wZ is using NULL driver\n", &DeviceNode->InstancePath);
|
||||||
IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED);
|
IopDeviceNodeSetFlag(DeviceNode, DNF_STARTED);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED);
|
||||||
|
}
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue