From: Hervé Poussineau Date: Mon, 15 May 2006 16:05:02 +0000 (+0000) Subject: Correctly support USB hubs X-Git-Tag: ReactOS-0.3.0~43^2~5 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=1d77bcb312e74ff352ce7dc0e92075f09be4d5dc;ds=sidebyside Correctly support USB hubs svn path=/trunk/; revision=21908 --- diff --git a/reactos/drivers/usb/usbhub/pdo.c b/reactos/drivers/usb/usbhub/pdo.c index 1339412225f..d7d117fcb46 100644 --- a/reactos/drivers/usb/usbhub/pdo.c +++ b/reactos/drivers/usb/usbhub/pdo.c @@ -29,6 +29,28 @@ UsbhubDeviceControlPdo( switch (Stack->Parameters.DeviceIoControl.IoControlCode) { + case IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE: + { + PHUB_DEVICE_EXTENSION DeviceExtension; + + DPRINT("Usbhub: IOCTL_INTERNAL_USB_GET_ROOT_USB_DEVICE\n"); + if (Irp->AssociatedIrp.SystemBuffer == NULL + || Stack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(PVOID)) + { + Status = STATUS_INVALID_PARAMETER; + } + else + { + PVOID* pHubPointer; + DeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + + pHubPointer = (PVOID*)Irp->AssociatedIrp.SystemBuffer; + *pHubPointer = DeviceExtension->dev; + Information = sizeof(PVOID); + Status = STATUS_SUCCESS; + } + break; + } default: { DPRINT1("Usbhub: Unknown IOCTL code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); @@ -52,7 +74,6 @@ UsbhubPdoStartDevice( NTSTATUS Status; DeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension; - DbgBreakPoint(); /* Register and activate device interface */ Status = IoRegisterDeviceInterface(