The max speed was always being set to USB_SUPER_SPEED even when the phy was only capable of HIGH_SPEED. This uses the value set for the phy to set the max for the gadget. It resolves an issue with Window PCs where they report that using a USB3.0 port would result in better performance even when connecting through a 3.0 port. Signed-off-by: McCauley, Ben <ben.mccauley@xxxxxxxxxx> --- diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 1eaf31c..0a388e3 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -2899,7 +2899,7 @@ } dwc->gadget.ops = &dwc3_gadget_ops; - dwc->gadget.max_speed = USB_SPEED_SUPER; + dwc->gadget.max_speed = dwc->maximum_speed; dwc->gadget.speed = USB_SPEED_UNKNOWN; dwc->gadget.sg_supported = true; dwc->gadget.name = "dwc3-gadget"; ________________________________ CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be confidential and/or legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you. -- 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