linux/drivers/usb/dwc3
John Youn aebda61871 usb: dwc3: Reset the transfer resource index on SET_INTERFACE
This fixes an issue introduced in commit b23c843992 (usb: dwc3:
gadget: fix DEPSTARTCFG for non-EP0 EPs) that made sure we would
only use DEPSTARTCFG once per SetConfig.

The trick is that we should use one DEPSTARTCFG per SetConfig *OR*
SetInterface. SetInterface was completely missed from the original
patch.

This problem became aparent after commit 76e838c9f7 (usb: dwc3:
gadget: return error if command sent to DEPCMD register fails)
added checking of the return status of device endpoint commands.

'Set Endpoint Transfer Resource' command was caught failing
occasionally. This is because the Transfer Resource
Index was not getting reset during a SET_INTERFACE request.

Finally, to fix the issue, was we have to do is make sure that
our start_config_issued flag gets reset whenever we receive a
SetInterface request.

To verify the problem (and its fix), all we have to do is run
test 9 from testusb with 'testusb -t 9 -s 2048 -a -c 5000'.

Tested-by: Huang Rui <ray.huang@amd.com>
Tested-by: Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>
Fixes: b23c843992 (usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs)
Cc: <stable@vger.kernel.org> # v3.2+
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-22 08:52:42 -05:00
..
core.c usb: dwc3: core: avoid NULL pointer dereference 2015-07-06 12:34:08 -05:00
core.h Merge 4.1-rc7 into usb-next 2015-06-08 10:57:51 -07:00
debug.c usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
debug.h
debugfs.c usb: dwc3: switch to GPL v2 only 2013-07-29 13:56:44 +03:00
dwc3-exynos.c
dwc3-keystone.c
dwc3-omap.c usb: dwc3: dwc3-omap: correct the register macros 2015-04-27 14:36:52 -05:00
dwc3-pci.c usb: dwc3: pci: add quirk for Baytrails 2015-05-13 12:06:47 -05:00
dwc3-qcom.c
dwc3-st.c
ep0.c usb: dwc3: Reset the transfer resource index on SET_INTERFACE 2015-07-22 08:52:42 -05:00
gadget.c
gadget.h
host.c usb: dwc3: make LPM configurable in DT 2015-03-10 15:33:33 -05:00
io.h usb: dwc3: add tracepoints to aid debugging 2014-09-05 09:55:51 -05:00
Kconfig usb: dwc3: Use ASCII space in Kconfig 2015-06-12 17:42:31 -07:00
Makefile
platform_data.h
trace.c
trace.h usb: dwc3: trace: add trace logs for core and gadget 2015-01-27 13:56:10 -06:00
ulpi.c usb: dwc3: add ULPI interface support 2015-05-13 12:06:52 -05:00