mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[USB-BRINGUP-TRUNK]
- Allow surprise removal of HID devices - Don't assemble useless empty resource lists svn path=/branches/usb-bringup-trunk/; revision=55119
This commit is contained in:
parent
33e7325e17
commit
1f321cafad
2 changed files with 11 additions and 32 deletions
|
@ -1504,6 +1504,11 @@ HidPnp(
|
|||
//
|
||||
IoStack->Parameters.DeviceCapabilities.Capabilities->DeviceD1 = TRUE;
|
||||
IoStack->Parameters.DeviceCapabilities.Capabilities->DeviceD2 = TRUE;
|
||||
|
||||
//
|
||||
// don't need to safely remove
|
||||
//
|
||||
IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -517,44 +517,18 @@ USBHUB_PdoHandlePnp(
|
|||
}
|
||||
case IRP_MN_QUERY_RESOURCES:
|
||||
{
|
||||
PCM_RESOURCE_LIST ResourceList;
|
||||
|
||||
DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCES\n");
|
||||
ResourceList = ExAllocatePool(PagedPool, sizeof(CM_RESOURCE_LIST));
|
||||
if (!ResourceList)
|
||||
{
|
||||
DPRINT1("ExAllocatePool() failed\n");
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
else
|
||||
{
|
||||
ResourceList->Count = 0;
|
||||
Information = (ULONG_PTR)ResourceList;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Information = Irp->IoStatus.Information;
|
||||
Status = Irp->IoStatus.Status;
|
||||
break;
|
||||
}
|
||||
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
|
||||
{
|
||||
PIO_RESOURCE_REQUIREMENTS_LIST ResourceList;
|
||||
DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_RESOURCE_REQUIREMENTS\n");
|
||||
ResourceList = ExAllocatePool(PagedPool, sizeof(IO_RESOURCE_REQUIREMENTS_LIST));
|
||||
if (!ResourceList)
|
||||
{
|
||||
DPRINT1("ExAllocatePool() failed\n");
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
else
|
||||
{
|
||||
RtlZeroMemory(ResourceList, sizeof(IO_RESOURCE_REQUIREMENTS_LIST));
|
||||
ResourceList->ListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST);
|
||||
ResourceList->AlternativeLists = 1;
|
||||
ResourceList->List->Version = 1;
|
||||
ResourceList->List->Revision = 1;
|
||||
ResourceList->List->Count = 0;
|
||||
Information = (ULONG_PTR)ResourceList;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
Information = Irp->IoStatus.Information;
|
||||
Status = Irp->IoStatus.Status;
|
||||
break;
|
||||
}
|
||||
case IRP_MN_QUERY_DEVICE_TEXT:
|
||||
|
|
Loading…
Reference in a new issue