[HIDUSB]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Mon, 13 Feb 2012 11:12:58 +0000 (11:12 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Mon, 13 Feb 2012 11:12:58 +0000 (11:12 +0000)
- Retrieve protocol after configuration has been selected
- Fixes HID regression
See issue #6886 for more details.

svn path=/trunk/; revision=55572

reactos/drivers/hid/hidusb/hidusb.c

index 4fc26fd..79720ac 100644 (file)
@@ -1311,6 +1311,7 @@ Hid_GetProtocol(
     //
     DeviceExtension = (PHID_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
     HidDeviceExtension = (PHID_USB_DEVICE_EXTENSION)DeviceExtension->MiniDeviceExtension;
+    ASSERT(HidDeviceExtension->InterfaceInfo);
 
     if (HidDeviceExtension->InterfaceInfo->SubClass != 0x1)
     {
@@ -1487,11 +1488,6 @@ Hid_PnpStart(
     //
     Hid_SetIdle(DeviceObject);
 
-    //
-    // get protocol
-    //
-    Hid_GetProtocol(DeviceObject);
-
     //
     // move to next descriptor
     //
@@ -1518,6 +1514,11 @@ Hid_PnpStart(
         // done
         //
         DPRINT("[HIDUSB] SelectConfiguration %x\n", Status);
+
+        //
+        // get protocol
+        //
+        Hid_GetProtocol(DeviceObject);
         return Status;
     }
 
@@ -1526,6 +1527,11 @@ Hid_PnpStart(
     //
     UNIMPLEMENTED
     ASSERT(FALSE);
+
+    //
+    // get protocol
+    //
+    Hid_GetProtocol(DeviceObject);
     return STATUS_SUCCESS;
 }