UPSTREAM: usb: dwc3: gadget: disable XFER_NOT_READY
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 30 May 2016 10:40:00 +0000 (13:40 +0300)
committerHuang, Tao <huangtao@rock-chips.com>
Tue, 16 Aug 2016 12:48:19 +0000 (20:48 +0800)
We don't need this IRQ anymore for interrupt or bulk
endpoints.

Change-Id: I223ef88f807d7265a00d8d7be480320722d7ef88
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit 13fa2e69b1dda31bddb11fe61f250b9415885ead)

drivers/usb/dwc3/gadget.c

index 2d13adb7649fa204a92638033de433cbd8b045ca..8233716efb3695571ce9c0d808384b5b3e656a83 100644 (file)
@@ -485,8 +485,10 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
                params.param2 |= dep->saved_state;
        }
 
-       params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN
-               | DWC3_DEPCFG_XFER_NOT_READY_EN;
+       params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN;
+
+       if (dep->number <= 1 || usb_endpoint_xfer_isoc(desc))
+               params.param1 |= DWC3_DEPCFG_XFER_NOT_READY_EN;
 
        if (usb_ss_max_streams(comp_desc) && usb_endpoint_xfer_bulk(desc)) {
                params.param1 |= DWC3_DEPCFG_STREAM_CAPABLE