]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: dwc2: gadget: Program ep0_mps for LS
authorVardan Mikayelyan <mvardan@synopsys.com>
Tue, 15 Nov 2016 03:17:00 +0000 (19:17 -0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 18 Nov 2016 11:54:50 +0000 (13:54 +0200)
When device is enumerated in LS we should program ep0_mps accordingly.
USB2 spec says that in LS mode, control ep mps must be 8.

Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/gadget.c

index 74f0a5eed812b0fb063845b4b03fe4f46cd73b57..e67283237fd44030a2337f278dc018bad2b0164e 100644 (file)
@@ -3007,6 +3007,8 @@ static void dwc2_hsotg_irq_enumdone(struct dwc2_hsotg *hsotg)
 
        case DSTS_ENUMSPD_LS:
                hsotg->gadget.speed = USB_SPEED_LOW;
+               ep0_mps = 8;
+               ep_mps = 8;
                /*
                 * note, we don't actually support LS in this driver at the
                 * moment, and the documentation seems to imply that it isn't