From: John Heil High speed isochronous URB submits fail w -EMSGSIZE when packet size is 1024KB (which is permitted by the USB 2.0 Std). 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 1024K packets to flow. drivers/usb/core/urb.c | 2 +- drivers/usb/host/ehci-sched.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/usb/core/urb.c~usb-msgsize-fix drivers/usb/core/urb.c --- 25/drivers/usb/core/urb.c~usb-msgsize-fix 2003-11-17 17:20:37.000000000 -0800 +++ 25-akpm/drivers/usb/core/urb.c 2003-11-17 17:21:13.000000000 -0800 @@ -268,7 +268,7 @@ int usb_submit_urb(struct urb *urb, int /* "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 -puN drivers/usb/host/ehci-sched.c~usb-msgsize-fix drivers/usb/host/ehci-sched.c --- 25/drivers/usb/host/ehci-sched.c~usb-msgsize-fix 2003-11-17 17:20:37.000000000 -0800 +++ 25-akpm/drivers/usb/host/ehci-sched.c 2003-11-17 17:21:42.000000000 -0800 @@ -580,10 +580,10 @@ itd_fill ( 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? */ _