linux/drivers/usb/dwc3
Pratyush Anand 7efea86c28 usb: dwc3: gadget: fix missed isoc
There are two reasons to generate missed isoc.

1. when the host does not poll for all the data.
2. because of application-side delays that prevent all the data from
being transferred in programmed microframe.

Current code was able to handle first case only.  This patch handles
scenario 2 as well.Scenario 2 sometime may occur with complex gadget
application, however it can be easily reproduced for testing purpose as
follows:

a. use isoc binterval as 1 in f_sourcesink.
b. use pattern=0
c. introduce a delay of 150us deliberately in source_sink_complete, so
that after few frames it lands into scenario 2.
d. now run testusb 16 (isoc in  test). You will notice that if this
patch is not applied then isoc transfer is not able to recover after
first missed.

Current patch's approach is as under:

If missed isoc occurs and there is no request queued then issue END
TRANSFER, so that core generates next xfernotready and we will issue a
fresh START TRANSFER.
If there are still queued request then wait, do not issue either END or
UPDATE TRANSFER, just attach next request in request_list during giveback.
If any future queued request is successfully transferred then we will issue
UPDATE TRANSFER for all request in the request_list.

Cc: <stable@vger.kernel.org> # v3.6 v3.7 v3.8
Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-01-18 14:26:59 +02:00
..
core.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
core.h usb: dwc3: gadget: fix missed isoc 2013-01-18 14:26:59 +02:00
debug.h usb: dwc: remove "All rights reserved" statement. 2011-10-04 10:25:52 -07:00
debugfs.c usb: dwc3: debugfs: convert our regdump to use regsets 2013-01-18 10:21:34 +02:00
dwc3-exynos.c usb: dwc3: exynos: use devm_ functions 2013-01-18 10:11:34 +02:00
dwc3-omap.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
dwc3-pci.c usb: remove use of __devexit 2012-11-21 13:27:17 -08:00
ep0.c Merge 3.6-rc6 into usb-next 2012-09-16 20:42:46 -07:00
gadget.c usb: dwc3: gadget: fix missed isoc 2013-01-18 14:26:59 +02:00
gadget.h usb: dwc3: correct set_halt implementation for ep0 2012-07-02 10:02:07 +03:00
host.c usb: dwc3: core: split host address space 2012-04-24 15:37:04 +03:00
io.h usb: dwc3: core: split host address space 2012-04-24 15:37:04 +03:00
Kconfig usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEED 2012-08-31 12:49:40 +03:00
Makefile usb: dwc3: drop HAVE_CLK dependency from Exynos glue layer 2012-10-19 11:13:47 +03:00