Revert "UPSTREAM: usb: dwc3: gadget: disable XFER_NOT_READY"
authorWu Liang feng <wulf@rock-chips.com>
Tue, 6 Sep 2016 03:35:57 +0000 (11:35 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 7 Sep 2016 03:50:25 +0000 (11:50 +0800)
This reverts commit 2a1f2d1e890354821dd8a8e621998d532185061d.

Refer to DWC3 databook, Table 7-7 Device Endpoint-n Events(DEPEVT),
XferNotReady is generated when the core responds NRDY to the host
on the USB. It is useful in the beginning of a transfer when
software wants to wait for the host to start polling the endpoint
before setting up TRBs. And also refer to 8.2.4 Transfer Setup
Recommendations, when using on-demand transfers, the XferNotRead
event must be enabled.

TEST=Set usb gadget work as RNDIS, connect to win7/win10, check
the RNDIS function

Change-Id: I091cd3ff4a3c93e6cc02fcc6714511c8989786bf
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
drivers/usb/dwc3/gadget.c

index 4842f934e9d52836b72a6692008e87d9bcc4ab42..776de55028f6d3efa442943a8169ff3ee0768ab8 100644 (file)
@@ -490,10 +490,8 @@ static int dwc3_gadget_set_ep_config(struct dwc3 *dwc, struct dwc3_ep *dep,
                params.param0 |= DWC3_DEPCFG_ACTION_INIT;
        }
 
-       params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN;
-
-       if (dep->number <= 1 || usb_endpoint_xfer_isoc(desc))
-               params.param1 |= DWC3_DEPCFG_XFER_NOT_READY_EN;
+       params.param1 = DWC3_DEPCFG_XFER_COMPLETE_EN
+               | DWC3_DEPCFG_XFER_NOT_READY_EN;
 
        if (usb_ss_max_streams(comp_desc) && usb_endpoint_xfer_bulk(desc)) {
                params.param1 |= DWC3_DEPCFG_STREAM_CAPABLE