2.4.36-stable kernel tree
リビジョン | d624f2fab436f9eb84d7e1136b5667cd703041f8 (tree) |
---|---|
日時 | 2007-02-25 15:16:42 |
作者 | Pete Zaitcev <zaitcev@redh...> |
コミッター | Willy Tarreau |
[PATCH] usb 2.4: Support high-speed HID
Fix high-speed HID. According to Stuart:
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
@@ -1329,7 +1329,7 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum) | ||
1329 | 1329 | for (n = 0; n < interface->bNumEndpoints; n++) { |
1330 | 1330 | |
1331 | 1331 | struct usb_endpoint_descriptor *endpoint = &interface->endpoint[n]; |
1332 | - int pipe, maxp; | |
1332 | + int pipe, maxp, interval; | |
1333 | 1333 | |
1334 | 1334 | if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */ |
1335 | 1335 | continue; |
@@ -1339,8 +1339,11 @@ static struct hid_device *usb_hid_configure(struct usb_device *dev, int ifnum) | ||
1339 | 1339 | |
1340 | 1340 | pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); |
1341 | 1341 | maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); |
1342 | + interval = endpoint->bInterval; | |
1343 | + if (dev->speed == USB_SPEED_HIGH) | |
1344 | + interval = 1 << (interval - 1); | |
1342 | 1345 | |
1343 | - FILL_INT_URB(&hid->urb, dev, pipe, hid->buffer, maxp > 32 ? 32 : maxp, hid_irq, hid, endpoint->bInterval); | |
1346 | + FILL_INT_URB(&hid->urb, dev, pipe, hid->buffer, maxp > 32 ? 32 : maxp, hid_irq, hid, interval); | |
1344 | 1347 | |
1345 | 1348 | break; |
1346 | 1349 | } |