usb: dwc3: workaround: missing USB3 Reset event
authorFelipe Balbi <balbi@ti.com>
Fri, 14 Oct 2011 11:51:38 +0000 (14:51 +0300)
committerFelipe Balbi <balbi@ti.com>
Mon, 12 Dec 2011 09:48:35 +0000 (11:48 +0200)
DWC3 revisions <1.90a have an issue which would cause
a missing USB3 Reset event. In such cases, it's
suggested that we follow the steps of a normal
USB3 Reset on Connection Done Event.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 0a6deeaf33772000529bf600fbe84101437bb0ec..6704a52c9f124f3c3bfb94b3491d535bc7c97067 100644 (file)
@@ -1756,6 +1756,22 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc)
 
        switch (speed) {
        case DWC3_DCFG_SUPERSPEED:
+               /*
+                * WORKAROUND: DWC3 revisions <1.90a have an issue which
+                * would cause a missing USB3 Reset event.
+                *
+                * In such situations, we should force a USB3 Reset
+                * event by calling our dwc3_gadget_reset_interrupt()
+                * routine.
+                *
+                * Refers to:
+                *
+                * STAR#9000483510: RTL: SS : USB3 reset event may
+                * not be generated always when the link enters poll
+                */
+               if (dwc->revision < DWC3_REVISION_190A)
+                       dwc3_gadget_reset_interrupt(dwc);
+
                dwc3_gadget_ep0_desc.wMaxPacketSize = cpu_to_le16(512);
                dwc->gadget.ep0->maxpacket = 512;
                dwc->gadget.speed = USB_SPEED_SUPER;