Patch taking account of log2 intervals for iso and interrupt urbs.

--- linux-2.5.54/drivers/usb/core/devio.c       2003-01-02 03:22:02.000000000 +0000
+++ /usr/src/linux/drivers/usb/core/devio.c     2003-01-16 20:04:52.000000000 +0000
@@ -854,13 +854,21 @@
                        return -EINVAL;
                }
                uurb.buffer_length = totlen;
-               break;
-
+               if(!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint)))
+                       return -ENOENT;
+               interval = 1 << (ep_desc->bInterval-1);
        case USBDEVFS_URB_TYPE_INTERRUPT:
                uurb.number_of_packets = 0;
                if (!(ep_desc = usb_epnum_to_ep_desc(ps->dev, uurb.endpoint)))
                        return -ENOENT;
-               interval = ep_desc->bInterval;
+               switch(ps->dev->speed){
+               case USB_SPEED_HIGH:
+                       interval = 1 << (ep_desc->bInterval-1);
+                       break;
+               default:
+                       interval = ep_desc->bInterval;
+               }
+               
                if (uurb.buffer_length > 16384)
                        return -EINVAL;
                if (!access_ok((uurb.endpoint & USB_DIR_IN) ? VERIFY_WRITE : 
VERIFY_READ, uurb.buffer, uurb.buffer_length))





-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to