linux/drivers/usb/dwc2
Dmitry Torokhov b3eb981be7 usb: dwc2: host: do not delay retries for CONTROL IN transfers
When handling split transactions we will try to delay retry after
getting a NAK from the device. This works well for BULK transfers that
can be polled for essentially forever. Unfortunately, on slower systems
at boot time, when the kernel is busy enumerating all the devices (USB
or not), we issue a bunch of control requests (reading device
descriptors, etc). If we get a NAK for the IN part of the control
request and delay retry for too long (because the system is busy), we
may confuse the device when we finally get to reissue SSPLIT/CSPLIT IN
and the device will respond with STALL. As a result we end up with
failure to get device descriptor and will fail to enumerate the device:

[    3.428801] usb 2-1.2.1: new full-speed USB device number 9 using dwc2
[    3.508576] usb 2-1.2.1: device descriptor read/8, error -32
[    3.699150] usb 2-1.2.1: device descriptor read/8, error -32
[    3.891653] usb 2-1.2.1: new full-speed USB device number 10 using dwc2
[    3.968859] usb 2-1.2.1: device descriptor read/8, error -32
...

Let's not delay retries of split CONTROL IN transfers, as this allows us
to reliably enumerate devices at boot time.

Fixes: 38d2b5fb75 ("usb: dwc2: host: Don't retry NAKed transactions right away")
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
2018-07-17 10:12:51 +03:00
..
core_intr.c usb: dwc2: Change reading of current frame number flow. 2018-05-15 10:17:09 +03:00
core.c usb: dwc2: Fix kernel doc's warnings. 2018-05-21 10:02:13 +03:00
core.h usb: dwc2: alloc dma aligned buffer for isoc split in 2018-06-19 12:48:13 +03:00
debug.h usb: dwc2: Fix kernel doc's warnings. 2018-05-21 10:02:13 +03:00
debugfs.c USB: dwc2: no need to check return value of debugfs_create functions 2018-05-31 12:54:22 +02:00
gadget.c dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation 2018-06-19 12:48:14 +03:00
hcd_ddma.c usb: dwc2: Fix kernel doc's warnings. 2018-05-21 10:02:13 +03:00
hcd_intr.c usb: dwc2: host: do not delay retries for CONTROL IN transfers 2018-07-17 10:12:51 +03:00
hcd_queue.c usb: dwc2: alloc dma aligned buffer for isoc split in 2018-06-19 12:48:13 +03:00
hcd.c usb: dwc2: alloc dma aligned buffer for isoc split in 2018-06-19 12:48:13 +03:00
hcd.h usb: dwc2: alloc dma aligned buffer for isoc split in 2018-06-19 12:48:13 +03:00
hw.h usb: dwc2: Add Interpacket Gap(IPG) feature support 2018-05-15 10:16:47 +03:00
Kconfig usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
params.c usb: dwc2: gadget: Fix coverity issue 2018-05-21 10:40:16 +03:00
pci.c usb: dwc2: pci: Fix error return code in dwc2_pci_probe() 2018-05-21 10:36:14 +03:00
platform.c usb: dwc2: Force mode optimizations 2018-03-13 10:47:58 +02:00