linux/drivers/usb/core
Feng Mingli f092c995c3 USB: core: flush pending URBs for unusual USB3 core when disable device
According to xHCI spec v1.1 section 6.4.5 TRB Completion Codes,
the standard XHCI controller provide a TRB Completion Status
'USB Transaction Error' to asserted in the case where the host
did not receive a valid response from the device, it's useful
to handle pending URBs on the endpoint when the USB device is
plugged out.

Unfortunately, some SOCs USB 3.0 modules lose the ability to
assert the 'USB Transaction Error' status when USB 3.0 device
disconnect. This may cause the pending URBs unhandled, even
lead to USB class driver stalled in waiting for URBs complete.

This patch flush pending URBs in usb_disable_device() when
USB 3.0 device disconnect, it will call xhci_urb_dequeue()
-> xhci_queue_stop_endpoint() to cancel pending URBs and
giveback URB status immediately.

Change-Id: If8acac59bc1f2c10a41ee390ccbeb84b2e7743c1
Signed-off-by: Feng Mingli <fml@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
2017-11-10 19:58:22 +08:00
..
buffer.c
config.c USB: fix out-of-bounds in usb_set_configuration 2017-10-12 11:27:33 +02:00
devices.c usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices 2016-09-07 08:32:39 +02:00
devio.c UPSTREAM: USB: usbfs: compute urb->actual_length for isochronous 2017-11-10 14:37:07 +08:00
driver.c usb: hub: Do not attempt to autosuspend disconnected devices 2017-05-20 14:26:59 +02:00
endpoint.c
file.c USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously 2017-05-20 14:26:58 +02:00
generic.c
hcd-pci.c usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices 2016-09-07 08:32:39 +02:00
hcd.c LSK 17.08 v4.4-android 2017-09-01 18:56:00 +08:00
hub.c USB: workaround for specified USB3 PHY disconnection det issue 2017-11-10 19:58:15 +08:00
hub.h
Kconfig
Makefile
message.c USB: core: flush pending URBs for unusual USB3 core when disable device 2017-11-10 19:58:22 +08:00
notify.c
otg_whitelist.h
port.c
quirks.c Merge branch 'linux-linaro-lsk-v4.4-android' of git://git.linaro.org/kernel/linux-linaro-stable.git 2017-11-02 17:00:07 +08:00
sysfs.c
urb.c USB: core: replace %p with %pK 2017-05-25 14:30:07 +02:00
usb-acpi.c usb: optimize acpi companion search for usb port devices 2017-08-24 17:02:36 -07:00
usb.c
usb.h usb: define USB_SPEED_SUPER_PLUS speed for SuperSpeedPlus USB3.1 devices 2016-09-07 08:32:39 +02:00