android_kernel_oneplus_msm8998/drivers/usb/core
Danilo Krummrich 38f5419448 usb: quirks: add control message delay for 1b1c:1b20
commit cb88a0588717ba6c756cb5972d75766b273a6817 upstream.

Corsair Strafe RGB keyboard does not respond to usb control messages
sometimes and hence generates timeouts.

Commit de3af5bf259d ("usb: quirks: add delay init quirk for Corsair
Strafe RGB keyboard") tried to fix those timeouts by adding
USB_QUIRK_DELAY_INIT.

Unfortunately, even with this quirk timeouts of usb_control_msg()
can still be seen, but with a lower frequency (approx. 1 out of 15):

[   29.103520] usb 1-8: string descriptor 0 read error: -110
[   34.363097] usb 1-8: can't set config #1, error -110

Adding further delays to different locations where usb control
messages are issued just moves the timeouts to other locations,
e.g.:

[   35.400533] usbhid 1-8:1.0: can't add hid device: -110
[   35.401014] usbhid: probe of 1-8:1.0 failed with error -110

The only way to reliably avoid those issues is having a pause after
each usb control message. In approx. 200 boot cycles no more timeouts
were seen.

Addionaly, keep USB_QUIRK_DELAY_INIT as it turned out to be necessary
to have the delay in hub_port_connect() after hub_port_init().

The overall boot time seems not to be influenced by these additional
delays, even on fast machines and lightweight distributions.

Fixes: de3af5bf259d ("usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard")
Cc: stable@vger.kernel.org
Signed-off-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-18 11:17:53 +01:00
..
buffer.c
config.c USB: Fix off by one in type-specific length check of BOS SSP capability 2018-01-02 20:33:27 +01:00
devices.c
devio.c USB: usbfs: Filter flags passed in from user space 2017-12-09 18:42:44 +01: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
hcd.c usb: hcd: initialize hcd->flags to 0 when rm hcd 2017-11-15 17:13:10 +01:00
hub.c usb: hub: Cycle HUB power when initialization fails 2017-12-09 18:42:43 +01:00
hub.h
Kconfig
Makefile
message.c usb: quirks: add control message delay for 1b1c:1b20 2018-03-18 11:17:53 +01:00
notify.c
otg_whitelist.h
port.c
quirks.c usb: quirks: add control message delay for 1b1c:1b20 2018-03-18 11:17:53 +01: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