Author: hpoussin
Date: Mon May 15 20:05:02 2006
New Revision: 21908
URL:
http://svn.reactos.ru/svn/reactos?rev=21908&view=rev
Log:
Correctly support USB hubs
Modified:
trunk/reactos/drivers/usb/usbhub/pdo.c
Modified: trunk/reactos/drivers/usb/usbhub/pdo.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/usb/usbhub/pdo.c?re…
==============================================================================
--- trunk/reactos/drivers/usb/usbhub/pdo.c (original)
+++ trunk/reactos/drivers/usb/usbhub/pdo.c Mon May 15 20:05:02 2006
@@ -29,6 +29,28 @@
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 @@
NTSTATUS Status;
DeviceExtension = (PHUB_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
- DbgBreakPoint();
/* Register and activate device interface */
Status = IoRegisterDeviceInterface(