usb: dwc3: set gadget's quirk ep_out_align_size
authorDavid Cohen <david.a.cohen@linux.intel.com>
Mon, 9 Dec 2013 23:55:38 +0000 (15:55 -0800)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Dec 2013 04:44:08 +0000 (22:44 -0600)
DWC3 requires epout to have buffer size aligned to MaxPacketSize value.
This patch sets necessary quirk for it.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c

index 5452c0f..b85ec11 100644 (file)
@@ -2600,6 +2600,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
        dwc->gadget.name                = "dwc3-gadget";
 
        /*
+        * Per databook, DWC3 needs buffer size to be aligned to MaxPacketSize
+        * on ep out.
+        */
+       dwc->gadget.quirk_ep_out_aligned_size = true;
+
+       /*
         * REVISIT: Here we should clear all pending IRQs to be
         * sure we're starting from a well known location.
         */