[USBOHCI]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 3 Feb 2012 11:29:03 +0000 (11:29 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 3 Feb 2012 11:29:03 +0000 (11:29 +0000)
- Don't hardcode the device speed

svn path=/branches/usb-bringup-trunk/; revision=55392

drivers/usb/usbhub_new/fdo.c

index 5497c3e..89b1787 100644 (file)
@@ -19,7 +19,8 @@ NTSTATUS
 CreateUsbChildDeviceObject(
     IN PDEVICE_OBJECT UsbHubDeviceObject,
     IN LONG PortId,
-    OUT PDEVICE_OBJECT *UsbChildDeviceObject);
+    OUT PDEVICE_OBJECT *UsbChildDeviceObject,
+    IN ULONG PortStatus);
 
 NTSTATUS
 DestroyUsbChildDeviceObject(
@@ -402,7 +403,7 @@ DeviceStatusChangeThread(
             //
             // This is a new device
             //
-            Status = CreateUsbChildDeviceObject(DeviceObject, PortId, NULL);
+            Status = CreateUsbChildDeviceObject(DeviceObject, PortId, NULL, PortStatus.Status);
         }
     }
 
@@ -1149,7 +1150,8 @@ NTSTATUS
 CreateUsbChildDeviceObject(
     IN PDEVICE_OBJECT UsbHubDeviceObject,
     IN LONG PortId,
-    OUT PDEVICE_OBJECT *UsbChildDeviceObject)
+    OUT PDEVICE_OBJECT *UsbChildDeviceObject,
+    IN ULONG PortStatus)
 {
     NTSTATUS Status;
     PDEVICE_OBJECT RootHubDeviceObject, NewChildDeviceObject;
@@ -1252,7 +1254,7 @@ CreateUsbChildDeviceObject(
     Status = HubInterface->CreateUsbDevice(HubInterfaceBusContext,
                                            (PVOID)&UsbChildExtension->UsbDeviceHandle,
                                            HubDeviceExtension->RootHubHandle,
-                                           0x501, //hack
+                                           PortStatus,
                                            PortId);
     if (!NT_SUCCESS(Status))
     {