From: Vardan Mikayelyan <mvar...@synopsys.com>

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 <mvar...@synopsys.com>
Signed-off-by: John Youn <johny...@synopsys.com>
---
 drivers/usb/dwc2/gadget.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index 77bebff..d6de6ff 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -3012,6 +3012,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
-- 
2.10.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to