On Fri, Feb 25, 2011 at 01:45:03PM -0800, Paul Zimmerman wrote: > Use the Mult and bMaxBurst values from the endpoint companion > descriptor to calculate the max length of an isoc transfer > > Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> > --- > drivers/usb/core/urb.c | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c > index c14fc08..991f33e 100644 > --- a/drivers/usb/core/urb.c > +++ b/drivers/usb/core/urb.c > @@ -366,7 +366,16 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) > if (xfertype == USB_ENDPOINT_XFER_ISOC) { > int n, len; > > - /* FIXME SuperSpeed isoc endpoints have up to 16 bursts */ > + /* SuperSpeed isoc endpoints have up to 16 bursts of up to > + * 3 packets each > + */ > + if (dev->speed == USB_SPEED_SUPER) { > + int burst = 1 + ep->ss_ep_comp.bMaxBurst; > + int mult = 1 + ep->ss_ep_comp.bmAttributes; Paul, please don't create new variables in an if block. Create them at the top of the function. > + max *= burst; > + max *= mult; > + } > + Where is max used later? I'll have to look further in the code to see if this actually works. I don't think you can just use the endpoint calculations, because the driver may want to submit a slightly shorter transfer length. It's really the USB core's job to check whether the buffer size is bigger than what the endpoint can handle. The code should go there instead. Sarah Sharp -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html