High speed isochronous URB submits fail w -EMSGSIZE when packet
size is 1024 bytes (which is permitted by the USB 2.0 EHCI Sted).

Max Packet Size is conveyed to the host controller via the iTD's
Buffer Pointer Page 1 field, @ offset +0x28[10:0].

drivers/usb/core/urb.c: usb_submit_urb incorrectly scales this
value w an AND mask of 0x03ff while determining the count of
packets. usb/host/ehci-sched.c repeats the error.

This fix corrects the AND mask allowing 1024B packets to flow.


[EMAIL PROTECTED] src]# less usb2-isoc-1024.patch
diff -Nru 2.6.0-t9-mm2.orig/drivers/usb/core/urb.c
2.6.0-t9-mm2/drivers/usb/core/urb.c
--- 2.6.0-t9-mm2.orig/drivers/usb/core/urb.c    2003-10-25
14:43:54.000000000 -0400
+++ 2.6.0-t9-mm2/drivers/usb/core/urb.c 2003-11-17 13:25:32.000000000
-0500
@@ -268,7 +268,7 @@
                /* "high bandwidth" mode, 1-3 packets/uframe? */
                if (dev->speed == USB_SPEED_HIGH) {
                        int     mult = 1 + ((max >> 11) & 0x03);
-                       max &= 0x03ff;
+                       max &= 0x07ff;
                        max *= mult;
                }

diff -Nru 2.6.0-t9-mm2.orig/drivers/usb/host/ehci-sched.c
2.6.0-t9-mm2/drivers/usb/host/ehci-sched.c
--- 2.6.0-t9-mm2.orig/drivers/usb/host/ehci-sched.c     2003-10-25
14:43:19.000000000 -0400
+++ 2.6.0-t9-mm2/drivers/usb/host/ehci-sched.c  2003-11-17
13:27:08.000000000 -0500
@@ -580,10 +580,10 @@
                maxp = urb->dev->epmaxpacketout [epnum];
                buf1 = 0;
        }
-       buf1 |= (maxp & 0x03ff);
+       buf1 |= (maxp & 0x07ff);
        multi = 1;
        multi += (maxp >> 11) & 0x03;
-       maxp &= 0x03ff;
+       maxp &= 0x07ff;
        maxp *= multi;

        /* transfer can't fit in any uframe? */


-
-----------------------------------------------------------------
John Heil
South Coast Software
Custom systems software for UNIX and IBM MVS mainframes
1-714-774-6952
[EMAIL PROTECTED]
http://www.sc-software.com
-----------------------------------------------------------------



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to