diff options
author | Paul Zimmerman <Paul.Zimmerman@synopsys.com> | 2012-02-24 20:32:18 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-03-02 05:12:11 -0500 |
commit | c2df85ca31645ed3c68c56bd30a3673e034224f1 (patch) | |
tree | 1a344944e22d7e4407c5d1c341323c73bf26fa16 /drivers/usb/dwc3/gadget.c | |
parent | 249a456930cd2df29d085fb738b0e8f4bc1680cf (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/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index bfdfd4f151f..da317f6a8bc 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -1628,10 +1628,8 @@ static void dwc3_endpoint_transfer_complete(struct dwc3 *dwc, | |||
1628 | status = -ECONNRESET; | 1628 | status = -ECONNRESET; |
1629 | 1629 | ||
1630 | clean_busy = dwc3_cleanup_done_reqs(dwc, dep, event, status); | 1630 | clean_busy = dwc3_cleanup_done_reqs(dwc, dep, event, status); |
1631 | if (clean_busy) { | 1631 | if (clean_busy) |
1632 | dep->flags &= ~DWC3_EP_BUSY; | 1632 | dep->flags &= ~DWC3_EP_BUSY; |
1633 | dep->res_trans_idx = 0; | ||
1634 | } | ||
1635 | 1633 | ||
1636 | /* | 1634 | /* |
1637 | * WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround. | 1635 | * WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround. |
@@ -1736,6 +1734,8 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc, | |||
1736 | 1734 | ||
1737 | switch (event->endpoint_event) { | 1735 | switch (event->endpoint_event) { |
1738 | case DWC3_DEPEVT_XFERCOMPLETE: | 1736 | case DWC3_DEPEVT_XFERCOMPLETE: |
1737 | dep->res_trans_idx = 0; | ||
1738 | |||
1739 | if (usb_endpoint_xfer_isoc(dep->desc)) { | 1739 | if (usb_endpoint_xfer_isoc(dep->desc)) { |
1740 | dev_dbg(dwc->dev, "%s is an Isochronous endpoint\n", | 1740 | dev_dbg(dwc->dev, "%s is an Isochronous endpoint\n", |
1741 | dep->name); | 1741 | dep->name); |