linux/drivers/usb/dwc3
Sebastian Andrzej Siewior 5bdb1dcc63 usb: dwc3: ep0: handle delayed_status again
Since the re-worked ep0 handling (which uses HW's hints to recognize the ep0
status) we lost the delayed status handling. This is used by the file and mass
storage gadget to gain some extra time so setup its internal status before it
can proceed further requests.
In particular the storage gadget does nothing on USB_REQ_SET_CONFIGURATION but
wakes up a thread which handles the request. If the udc driver continues ep0
handling before the thread did its work then then endpoint is not yet
configured and further requests will fail. Once the gadget is ready, it will
enqueue an empty packet which is used for synchronization.
In order to fix this issue, the patch does the following:
Set ->delayed_status once the delayed_status has been notices and do not
continue on the next XferNotReady event. We will continues ep0 processing once
the gadget enqueued the zero packet for synchronization.

A cleaner approach would be to enforce the gadget to enqueue an empty
(zero) request even for the status phase but this would do for now.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-12-12 11:48:31 +02:00
..
core.c usb: dwc3: move generic dwc3 code from gadget into core 2011-12-12 11:48:27 +02:00
core.h usb: dwc3: ep0: handle delayed_status again 2011-12-12 11:48:31 +02:00
debug.h usb: dwc: remove "All rights reserved" statement. 2011-10-04 10:25:52 -07:00
debugfs.c usb: dwc3: fix sparse errors 2011-12-12 11:48:29 +02:00
dwc3-omap.c usb: dwc3: omap: add multiple instances support to OMAP 2011-12-12 11:48:23 +02:00
dwc3-pci.c usb: dwc3: move dwc3 device ID bitmap to core.c 2011-12-12 11:48:21 +02:00
ep0.c usb: dwc3: ep0: handle delayed_status again 2011-12-12 11:48:31 +02:00
gadget.c usb: dwc3: fix few coding style problems 2011-12-12 11:48:29 +02:00
gadget.h usb: dwc3: fix few coding style problems 2011-12-12 11:48:29 +02:00
host.c usb: dwc3: host: remove unused includes 2011-12-12 11:48:19 +02:00
io.h usb: dwc3: fix few coding style problems 2011-12-12 11:48:29 +02:00
Kconfig usb: dwc3: depend on both Host and Gadget stacks 2011-12-12 11:48:14 +02:00
Makefile usb: dwc3: always compile gadget side too 2011-12-12 11:48:13 +02:00