linux/drivers/usb/chipidea
Peter Chen e4adcff09c usb: chipidea: udc: delete td from req's td list at ep_dequeue
We need to delete un-finished td from current request's td list
at ep_dequeue API, otherwise, this non-user td will be remained
at td list before this request is freed. So if we do ep_queue->
ep_dequeue->ep_queue sequence, when the complete interrupt for
the second ep_queue comes, we search td list for this request,
the first td (added by the first ep_queue) will be handled, and
its status is still active, so we will consider the this transfer
still not be completed, but in fact, it has completed. It causes
the peripheral side considers it never receives current data for
this transfer.

We met this problem when do "Error Recovery Test - Device Configured"
test item for USBCV2 MSC test, the host has never received ACK for
the IN token for CSW due to peripheral considers it does not get this
CBW, the USBCV test log like belows:

--------------------------------------------------------------------------
INFO
Issuing BOT MSC Reset, reset should always succeed
INFO
Retrieving status on CBW endpoint
INFO
CBW endpoint status = 0x0
INFO
Retrieving status on CSW endpoint
INFO
CSW endpoint status = 0x0
INFO
Issuing required command (Test Unit Ready) to verify device has recovered
INFO
Issuing CBW (attempt #1):
INFO
|----- CBW LUN                  = 0x0
INFO
|----- CBW Flags                = 0x0
INFO
|----- CBW Data Transfer Length = 0x0
INFO
|----- CBW CDB Length           = 0x6
INFO
|----- CBW CDB-00 = 0x0
INFO
|----- CBW CDB-01 = 0x0
INFO
|----- CBW CDB-02 = 0x0
INFO
|----- CBW CDB-03 = 0x0
INFO
|----- CBW CDB-04 = 0x0
INFO
|----- CBW CDB-05 = 0x0
INFO
Issuing CSW : try 1
INFO
CSW Bulk Request timed out!
ERROR
Failed CSW phase : should have been success or stall
FAIL
(5.3.4) The CSW status value must be 0x00, 0x01, or 0x02.
ERROR
BOTCommonMSCRequest failed:  error=80004000

Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: stable@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-01 23:06:02 -07:00
..
Kconfig usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-09-25 17:30:39 -07:00
Makefile usb: chipidea: usb OTG fsm initialization. 2014-04-24 12:56:34 -07:00
bits.h usb: chipidea: OTG fsm timers initialization 2014-04-24 12:56:35 -07:00
ci.h usb: chipidea: add OTG fsm operation functions implementation 2014-04-24 12:56:35 -07:00
ci_hdrc_imx.c usb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs 2014-03-12 12:32:21 -07:00
ci_hdrc_imx.h USB: chipidea: add guard macro to ci_hdrc_imx.h 2014-01-03 12:37:57 -08:00
ci_hdrc_msm.c usb: chipidea: msm: Initialize offset of the capability registers 2014-05-23 11:36:44 +09:00
ci_hdrc_pci.c usb: chipidea: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-03 10:22:52 -08:00
ci_hdrc_zevio.c usb: chipidea: add support for USB OTG controller on LSI Zevio SoCs 2014-03-12 12:32:21 -07:00
core.c usb: chipidea: using one inline function to cover queue work operations 2014-05-23 11:35:02 +09:00
debug.c usb: chipidea: debug: add debug file for OTG variables 2014-04-24 12:56:35 -07:00
debug.h usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
host.c usb: chipidea: host: init otg port number 2014-04-24 12:56:35 -07:00
host.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
otg.c usb: chipidea: add sys inputs for OTG fsm input 2014-04-24 12:56:35 -07:00
otg.h usb: chipidea: using one inline function to cover queue work operations 2014-05-23 11:35:02 +09:00
otg_fsm.c usb: chipidea: using one inline function to cover queue work operations 2014-05-23 11:35:02 +09:00
otg_fsm.h usb: chipidea: add sys inputs for OTG fsm input 2014-04-24 12:56:35 -07:00
udc.c usb: chipidea: udc: delete td from req's td list at ep_dequeue 2014-07-01 23:06:02 -07:00
udc.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
usbmisc_imx.c chipidea: usbmisc_imx: Allow USB OTG to work on mx51 2014-05-23 11:36:43 +09:00