OSDN Git Service

usb: dwc3: gadget: issue ENDTRANSFER conditional on resource_index
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 21 Jun 2016 07:32:02 +0000 (10:32 +0300)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 21 Jun 2016 07:38:44 +0000 (10:38 +0300)
commit0e146028eebf989e86d3fe9385b76434e954c84e
tree7df417e9250bd4990de6d3a3357ba8b0b975834a
parent328082376aea6016b63bca1e5c067a9539f9e8c9
usb: dwc3: gadget: issue ENDTRANSFER conditional on resource_index

Because of recent changes to transfer handling on
DWC3, we will not get XferComplete unless we
completely fill up our TRB ring. This means that we
might get a Reset or Disconnect without getting a
XferComplete first.

In order to correctly release our allocated Transfer
Resource, we must issue ENDTRANSFER command whenever
dep->resource_index is valid.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/gadget.c