On Mon, 22 Aug 2011, Felipe Balbi wrote: > this patch adds superspeed descriptors for the > storage gadgets. ... > --- a/drivers/usb/gadget/file_storage.c > +++ b/drivers/usb/gadget/file_storage.c > @@ -589,10 +589,15 @@ static int populate_config_buf(struct usb_gadget *gadget, > return -EINVAL; > > if (gadget_is_dualspeed(gadget) && type == USB_DT_OTHER_SPEED_CONFIG) > - speed = (USB_SPEED_FULL + USB_SPEED_HIGH) - speed; > - function = gadget_is_dualspeed(gadget) && speed == USB_SPEED_HIGH > - ? (const struct usb_descriptor_header **)fsg_hs_function > - : (const struct usb_descriptor_header **)fsg_fs_function; > + speed = (USB_SPEED_FULL + USB_SPEED_HIGH + > + USB_SPEED_SUPER) - speed; What on Earth happened here? This line shouldn't be changed. It's supposed to set speed to USB_SPEED_FULL if we're currently running at high speed and vice versa -- that is, it computes the _other_ speed. Which reminds me... Something got left out of the patch. In standard_setup_req(), the USB_DT_DEVICE_QUALIFIER and USB_DT_OTHER_SPEED_CONFIG cases need to return an error if we are currently running at SuperSpeed. Those two descriptors aren't supported in USB-3. For example: case USB_DT_DEVICE_QUALIFIER: VDBG(fsg, "get device qualifier\n"); - if (!gadget_is_dualspeed(fsg->gadget)) + if (!gadget_is_dualspeed(fsg->gadget) || + fsg->gadget->speed == USB_SPEED_SUPER) break; /* Alan Stern -- 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