summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/ep0.c
diff options
context:
space:
mode:
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>2012-02-24 17:32:18 -0800
committerFelipe Balbi <balbi@ti.com>2012-03-02 12:12:11 +0200
commitc2df85ca31645ed3c68c56bd30a3673e034224f1 (patch)
tree1a344944e22d7e4407c5d1c341323c73bf26fa16 /drivers/usb/dwc3/ep0.c
parent249a456930cd2df29d085fb738b0e8f4bc1680cf (diff)
usb: dwc3: clear 'res_trans_idx' as soon as it becomes invalid
Transfer resource index is cleared in hardware when XFERCOMPLETE event is generated, so clear the driver's res_trans_idx variable immediately after that event is received. The upcoming hibernation patches depend on this change. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/ep0.c')
-rw-r--r--drivers/usb/dwc3/ep0.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 4fa2c9873ea..73efdf6938a 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -617,6 +617,7 @@ static void dwc3_ep0_xfer_complete(struct dwc3 *dwc,
struct dwc3_ep *dep = dwc->eps[event->endpoint_number];
dep->flags &= ~DWC3_EP_BUSY;
+ dep->res_trans_idx = 0;
dwc->setup_packet_pending = false;
switch (dwc->ep0state) {