linux/drivers/usb/dwc3
Amit Virdi 39e60635a0 usb: dwc3: gadget: Stop TRB preparation after limit is reached
DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This
means, the max TRBs that can be submitted for an EP is fixed to 32. Since the
request queue for an EP is a linked list, any number of requests can be queued
to it by the gadget layer.  However, the dwc3 driver must not submit TRBs more
than the pool it has created for. This limit wasn't respected when SG was used
resulting in submitting more than the max TRBs, eventually leading to
non-transfer of the TRBs submitted over the max limit.

Root cause:
When SG is used, there are two loops iterating to prepare TRBs:
 - Outer loop over the request_list
 - Inner loop over the SG list
The code was missing break to get out of the outer loop.

Fixes: eeb720fb21 (usb: dwc3: gadget: add support for SG lists)
Cc: <stable@vger.kernel.org> # v3.9+
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-14 11:29:05 -06:00
..
Kconfig usb: dwc3: exynos: remove non-DT support for Exynos Specific Glue layer 2014-11-05 13:22:19 -06:00
Makefile usb: dwc3: Add Qualcomm DWC3 glue layer driver 2014-09-12 15:43:48 -05:00
core.c usb: dwc3: core: enable phy suspend quirk on non-FPGA 2014-11-06 16:18:19 -06:00
core.h usb: dwc3: make HIRD threshold configurable 2014-11-03 10:03:41 -06:00
debug.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debug.h usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debugfs.c usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
dwc3-exynos.c usb: dwc3: exynos: Add provision for AXI UpScaler clock on exynos7 2014-11-21 09:07:29 -06:00
dwc3-keystone.c usb: dwc3: keystone: fix error return code 2014-11-20 13:35:46 -06:00
dwc3-omap.c usb: dwc3: dwc3-omap: get rid of ->prepare()/->complete() 2014-11-03 10:00:58 -06:00
dwc3-pci.c usb: dwc3: pci: add support for Intel Sunrise Point PCH 2014-12-22 10:39:14 -06:00
dwc3-qcom.c USB: Remove .owner field for driver 2014-09-28 21:55:10 -04:00
dwc3-st.c usb: dwc3: return error code from the most recent call 2014-11-24 08:38:27 -06:00
ep0.c Merge 3.18-rc7 into usb-next 2014-11-30 19:21:03 -08:00
gadget.c usb: dwc3: gadget: Stop TRB preparation after limit is reached 2015-01-14 11:29:05 -06:00
gadget.h usb: dwc3: gadget: fix set_halt() bug with pending transfers 2014-10-20 15:58:48 -05:00
host.c usb: dwc3: host: convey the PHYs to xhci 2014-11-22 13:58:48 +05:30
io.h usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
platform_data.h usb: dwc3: make HIRD threshold configurable 2014-11-03 10:03:41 -06:00
trace.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
trace.h usb: dwc3: trace: don't save pointers 2014-11-20 10:12:32 -06:00