linux/drivers/usb/dwc3
Felipe Balbi cf3113d893 usb: dwc3: gadget: properly increment dequeue pointer on ep_dequeue
If request was already started, this means we had to
stop the transfer. With that we also need to ignore
all TRBs used by the request, however TRBs can only
be modified after completion of END_TRANSFER
command. So what we have to do here is wait for
END_TRANSFER completion and only after that jump
over TRBs by clearing HWO and incrementing dequeue
pointer.

Note that we have 2 possible types of transfers
here:

i) Linear buffer request
ii) SG-list based request

SG-list based requests will have r->num_pending_sgs
set to a valid number (> 0). Linear requests,
normally use a single TRB.

For each of these two cases, if r->unaligned flag is
set, one extra TRB has been used to align transfer
size to wMaxPacketSize.

All of these cases need to be taken into
consideration so we don't mess up our TRB ring
pointers.

Tested-by: Janusz Dziedzic <januszx.dziedzic@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2017-03-06 10:09:37 +02:00
..
core.c usb: patches for v4.10 merge window 2016-11-18 16:02:15 +01:00
core.h usb: dwc3: gadget: align transfers to wMaxPacketSize 2017-01-24 11:04:13 +02:00
debug.h usb: dwc3: trace: purge dwc3_trace() 2016-11-08 12:52:13 +02:00
debugfs.c usb: dwc3: add DWC3_GUCTL1 reg for debug 2016-06-20 12:32:46 +03:00
dwc3-exynos.c USB: changes for v4.11 2017-01-26 15:36:28 +01:00
dwc3-keystone.c usb: dwc3: keystone: drop dma_mask configuration 2016-04-06 16:36:01 +03:00
dwc3-of-simple.c usb: dwc3: of-simple: add compatible for Cavium 2016-09-13 09:28:59 +03:00
dwc3-omap.c usb: dwc3: omap: Replace the extcon API 2017-01-24 11:04:15 +02:00
dwc3-pci.c usb: dwc3: pci: add Intel Gemini Lake PCI ID 2017-01-02 10:55:28 +02:00
dwc3-st.c usb: patches for v4.10 merge window 2016-11-18 16:02:15 +01:00
ep0.c usb: dwc3: ep0: Fix the possible missed request for handling delay STATUS phase 2017-01-24 11:04:15 +02:00
gadget.c usb: dwc3: gadget: properly increment dequeue pointer on ep_dequeue 2017-03-06 10:09:37 +02:00
gadget.h usb: dwc3: gadget: make Set Endpoint Configuration macros safe 2017-03-06 10:09:37 +02:00
host.c usb: dwc3: host: pass quirk-broken-port-ped property for known broken revisions 2017-01-26 11:17:37 +02:00
io.h usb: dwc3: trace: add a proper tracepoint for reg accessors 2016-11-03 10:38:30 +02:00
Kconfig usb: dwc3: pci: call _DSM for suspend/resume 2016-11-03 10:38:42 +02:00
Makefile usb: dwc3: trace: purge dwc3_trace() 2016-11-08 12:52:13 +02:00
trace.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
trace.h usb: dwc3: trace: add a tracepoint for ep enable/disable 2016-11-08 12:52:12 +02:00
ulpi.c usb: dwc3: ulpi: make dwc3_ulpi_ops constant 2016-09-06 10:47:26 +03:00