diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-10 11:07:46 -0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-11 08:09:48 -0400 |
commit | a0ad85ae866f8a01f29a18ffa1e9b1aa8ca888bd (patch) | |
tree | ee4efab2878eedd8a9ef678999f2284a8599fa68 /drivers/usb | |
parent | 79d17482a4091056e128a5048e253f2ed53440cc (diff) |
usb: dwc3: gadget: stop processing on HWO set
stop consuming TRBs when we reach one with HWO bit
already set. This will prevent us from prematurely
retiring a TRB.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 7a4d4d2534d4..1f5597ef945d 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -1979,16 +1979,7 @@ static int __dwc3_cleanup_done_trbs(struct dwc3 *dwc, struct dwc3_ep *dep, | |||
1979 | trb->ctrl &= ~DWC3_TRB_CTRL_HWO; | 1979 | trb->ctrl &= ~DWC3_TRB_CTRL_HWO; |
1980 | 1980 | ||
1981 | if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) | 1981 | if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) |
1982 | /* | 1982 | return 1; |
1983 | * We continue despite the error. There is not much we | ||
1984 | * can do. If we don't clean it up we loop forever. If | ||
1985 | * we skip the TRB then it gets overwritten after a | ||
1986 | * while since we use them in a ring buffer. A BUG() | ||
1987 | * would help. Lets hope that if this occurs, someone | ||
1988 | * fixes the root cause instead of looking away :) | ||
1989 | */ | ||
1990 | dev_err(dwc->dev, "%s's TRB (%p) still owned by HW\n", | ||
1991 | dep->name, trb); | ||
1992 | 1983 | ||
1993 | count = trb->size & DWC3_TRB_SIZE_MASK; | 1984 | count = trb->size & DWC3_TRB_SIZE_MASK; |
1994 | 1985 | ||