mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[HAL]
- Handle IRP_MN_QUERY_CAPABILITIES for the ACPI_HAL device object [PNPMGR] - Don't bring up a device if a required IRP has failed - Don't perform operations on a child if it is not ready yet svn path=/trunk/; revision=53421
This commit is contained in:
parent
1d3261d9fc
commit
e306e52267
2 changed files with 38 additions and 6 deletions
|
@ -667,9 +667,16 @@ HalpDispatchPnp(IN PDEVICE_OBJECT DeviceObject,
|
|||
(PVOID)&Irp->IoStatus.Information);
|
||||
break;
|
||||
|
||||
case IRP_MN_QUERY_CAPABILITIES:
|
||||
|
||||
/* Call the worker */
|
||||
DPRINT("Querying the capabilities for the FDO\n");
|
||||
Status = HalpQueryCapabilities(DeviceObject,
|
||||
IoStackLocation->Parameters.DeviceCapabilities.Capabilities);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/* Pass it to the PDO */
|
||||
DPRINT("Other IRP: %lx\n", Minor);
|
||||
Status = Irp->IoStatus.Status;
|
||||
break;
|
||||
|
|
|
@ -320,7 +320,7 @@ IopStartDevice2(IN PDEVICE_OBJECT DeviceObject)
|
|||
Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status);
|
||||
DPRINT1("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status);
|
||||
}
|
||||
|
||||
/* Invalidate device state so IRP_MN_QUERY_PNP_DEVICE_STATE is sent */
|
||||
|
@ -762,6 +762,7 @@ IopCreateDeviceNode(PDEVICE_NODE ParentNode,
|
|||
}
|
||||
|
||||
IopDeviceNodeSetFlag(Node, DNF_LEGACY_DRIVER);
|
||||
IopDeviceNodeSetFlag(Node, DNF_PROCESSED);
|
||||
IopDeviceNodeSetFlag(Node, DNF_ADDED);
|
||||
IopDeviceNodeSetFlag(Node, DNF_STARTED);
|
||||
}
|
||||
|
@ -1523,7 +1524,7 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode,
|
|||
Status = ZwQueryDefaultLocale(FALSE, &LocaleId);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("ZwQueryDefaultLocale() failed with status 0x%lx\n", Status);
|
||||
DPRINT1("ZwQueryDefaultLocale() failed with status 0x%lx\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -1551,7 +1552,10 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode,
|
|||
}
|
||||
else
|
||||
{
|
||||
DPRINT("IopInitiatePnpIrp() failed (Status %x)\n", Status);
|
||||
DPRINT1("IopInitiatePnpIrp() failed (Status %x)\n", Status);
|
||||
|
||||
/* We have to return success otherwise we abort the traverse operation */
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
DPRINT("Sending IRP_MN_QUERY_CAPABILITIES to device stack (after enumeration)\n");
|
||||
|
@ -1559,7 +1563,10 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode,
|
|||
Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCapabilities);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status);
|
||||
DPRINT1("IopInitiatePnpIrp() failed (Status 0x%08lx)\n", Status);
|
||||
|
||||
/* We have to return success otherwise we abort the traverse operation */
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* This bit is only check after enumeration */
|
||||
|
@ -1579,7 +1586,10 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode,
|
|||
Status = IopGetParentIdPrefix(DeviceNode, &ParentIdPrefix);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT("IopGetParentIdPrefix() failed (Status 0x%08lx)\n", Status);
|
||||
DPRINT1("IopGetParentIdPrefix() failed (Status 0x%08lx)\n", Status);
|
||||
|
||||
/* We have to return success otherwise we abort the traverse operation */
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1630,6 +1640,9 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to create the instance key! (Status %lx)\n", Status);
|
||||
|
||||
/* We have to return success otherwise we abort the traverse operation */
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
IopQueryHardwareIds(DeviceNode, InstanceKey);
|
||||
|
@ -2030,6 +2043,12 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode,
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(DeviceNode->Flags & DNF_PROCESSED))
|
||||
{
|
||||
DPRINT1("Child not ready to be configured\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(DeviceNode->Flags & (DNF_DISABLED | DNF_STARTED | DNF_ADDED)))
|
||||
{
|
||||
WCHAR RegKeyBuffer[MAX_PATH];
|
||||
|
@ -2157,6 +2176,12 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode,
|
|||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(DeviceNode->Flags & DNF_PROCESSED))
|
||||
{
|
||||
DPRINT1("Child not ready to be added\n");
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (IopDeviceNodeHasFlag(DeviceNode, DNF_STARTED) ||
|
||||
IopDeviceNodeHasFlag(DeviceNode, DNF_ADDED) ||
|
||||
IopDeviceNodeHasFlag(DeviceNode, DNF_DISABLED))
|
||||
|
|
Loading…
Reference in a new issue