diff options
author | Janusz Dziedzic <januszx.dziedzic@linux.intel.com> | 2016-11-09 11:01:32 +0100 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 13:54:14 +0200 |
commit | ce3fc8b32994e16f69912c982823105aafead7a6 (patch) | |
tree | e60c196fd3dc368704769ece6c5f3f900f3d45be /drivers/usb/dwc3/gadget.c | |
parent | 8ab89da4c281873d58812db68cb42179904fc94b (diff) | |
download | op-kernel-dev-ce3fc8b32994e16f69912c982823105aafead7a6.zip op-kernel-dev-ce3fc8b32994e16f69912c982823105aafead7a6.tar.gz |
usb: dwc3: clean TRB if STARTTRANSFER fail
In case STARTTRANSFER will fail, clean TRB.
Seems HW in such case don't clean HWO bit.
So, without this cleanup prev_trb still have
HWO bit set.
In my case (without patch), after first START failed:
- dep->enqueue == 1
- dep->dequeue == 1
- prev_trb still have HWO set
- left_trb() == 0
No way to send more data.
Signed-off-by: Janusz Dziedzic <januszx.dziedzic@linux.intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 9d6c085..9262ef2 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1084,6 +1084,8 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep, u16 cmd_param) * here and stop, unmap, free and del each of the linked * requests instead of what we do now. */ + if (req->trb) + memset(req->trb, 0, sizeof(struct dwc3_trb)); dep->queued_requests--; dwc3_gadget_giveback(dep, req, ret); return ret; |