Fix high-speed HID. According to Stuart:

 The problem is that the usbhid driver (in hid-core.c) is _not_ modifying
 the  interrupt URB interval for high speed devices before calling 
 FILL_INT_URB, which causes the interval to be too low, and the ehci
 driver won't schedule the URB.

 Specifically this was seen with a new USB 2.0 Avocent KVM dongle.

Signed-off-by: Pete Zaitcev <[EMAIL PROTECTED]>

--- linux-2.4.33/drivers/usb/hid-core.c 2005-04-03 18:42:19.000000000 -0700
+++ linux-2.4.33-highhid/drivers/usb/hid-core.c 2007-02-22 11:19:05.000000000 
-0800
@@ -1329,7 +1329,7 @@ static struct hid_device *usb_hid_config
        for (n = 0; n < interface->bNumEndpoints; n++) {
 
                struct usb_endpoint_descriptor *endpoint = 
&interface->endpoint[n];
-               int pipe, maxp;
+               int pipe, maxp, interval;
 
                if ((endpoint->bmAttributes & 3) != 3)          /* Not an 
interrupt endpoint */
                        continue;
@@ -1339,8 +1339,11 @@ static struct hid_device *usb_hid_config
 
                pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
                maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
+               interval = endpoint->bInterval;
+               if (dev->speed == USB_SPEED_HIGH)
+                       interval = 1 << (interval - 1);
 
-               FILL_INT_URB(&hid->urb, dev, pipe, hid->buffer, maxp > 32 ? 32 
: maxp, hid_irq, hid, endpoint->bInterval);
+               FILL_INT_URB(&hid->urb, dev, pipe, hid->buffer, maxp > 32 ? 32 
: maxp, hid_irq, hid, interval);
 
                break;
        }

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to