Author: cgutman Date: Mon Jan 23 16:22:43 2012 New Revision: 55119
URL: http://svn.reactos.org/svn/reactos?rev=55119&view=rev Log: [USB-BRINGUP-TRUNK] - Allow surprise removal of HID devices - Don't assemble useless empty resource lists
Modified: branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c
Modified: branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/hid/hi... ============================================================================== --- branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/hid/hidusb/hidusb.c [iso-8859-1] Mon Jan 23 16:22:43 2012 @@ -1504,6 +1504,11 @@ // IoStack->Parameters.DeviceCapabilities.Capabilities->DeviceD1 = TRUE; IoStack->Parameters.DeviceCapabilities.Capabilities->DeviceD2 = TRUE; + + // + // don't need to safely remove + // + IoStack->Parameters.DeviceCapabilities.Capabilities->SurpriseRemovalOK = TRUE; }
//
Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/us... ============================================================================== --- branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] (original) +++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/pdo.c [iso-8859-1] Mon Jan 23 16:22:43 2012 @@ -517,44 +517,18 @@ } 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: