linux/drivers/usb/host
Dan Williams 48fc7dbd52 usb: xhci: change enumeration scheme to 'new scheme' by default
Change the default enumeration scheme for xhci attached non-SuperSpeed
devices from:

   Reset
   SetAddress [xhci address-device BSR = 0]
   GetDescriptor(8)
   GetDescriptor(18)

...to:

   Reset
   [xhci address-device BSR = 1]
   GetDescriptor(64)
   Reset
   SetAddress [xhci address-device BSR = 0]
   GetDescriptor(18)

...as some devices misbehave when encountering a SetAddress command
prior to GetDescriptor.  There are known legacy devices that require
this scheme, but testing has found at least one USB3 device that fails
enumeration when presented with this ordering.  For now, follow the ehci
case and enable 'new scheme' by default for non-SuperSpeed devices.

To support this enumeration scheme on xhci the AddressDevice operation
needs to be performed twice.  The first instance of the command enables
the HC's device and slot context info for the device, but omits sending
the device a SetAddress command (BSR == block set address request).
Then, after GetDescriptor completes, follow up with the full
AddressDevice+SetAddress operation.

As mentioned before, this ordering of events with USB3 devices causes an
extra state transition to be exposed to xhci.  Previously USB3 devices
would transition directly from 'enabled' to 'addressed' and never need
to underrun responses to 'get descriptor'. We do see the 64-byte
descriptor fetch the correct data, but the following 18-byte descriptor
read after the reset gets:

bLength            = 0
bDescriptorType    = 0
bcdUSB             = 0
bDeviceClass       = 0
bDeviceSubClass    = 0
bDeviceProtocol    = 0
bMaxPacketSize0    = 9

instead of:

bLength            = 12
bDescriptorType    = 1
bcdUSB             = 300
bDeviceClass       = 0
bDeviceSubClass    = 0
bDeviceProtocol    = 0
bMaxPacketSize0    = 9

which results in the discovery process looping until falling back to
'old scheme' enumeration.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: David Moore <david.moore@gmail.com>
Suggested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2013-12-10 13:54:37 -08:00
..
whci usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
bcma-hcd.c DMA-API: usb: bcma: replace dma_set_mask()+dma_set_coherent_mask() with new helper 2013-10-31 14:48:34 +00:00
ehci-atmel.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-dbg.c usb: Use dev_is_pci() to check whether it is pci device 2013-12-08 18:01:56 -08:00
ehci-exynos.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-fsl.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-fsl.h
ehci-grlib.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-hcd.c USB: kill #undef VERBOSE_DEBUG 2013-12-03 10:34:33 -08:00
ehci-hub.c ehci: no conditional compilation for interestingness 2013-12-03 10:25:22 -08:00
ehci-mem.c USB: EHCI: fix sparse errors 2013-10-19 14:08:04 -07:00
ehci-msm.c USB: ehci-msm: Add device tree support and binding information 2013-10-11 16:31:15 -07:00
ehci-mv.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-mxc.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-octeon.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-omap.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-orion.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-pci.c usb: ehci: use amd_chipset_type to filter for usb subsystem hang bug 2013-10-03 15:44:50 -07:00
ehci-platform.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-pmcmsp.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-ppc-of.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-ps3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-q.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
ehci-sched.c USB: EHCI: fix sparse errors 2013-10-19 14:08:04 -07:00
ehci-sead3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-sh.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-spear.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-sysfs.c USB: EHCI: use a bandwidth-allocation table 2013-10-11 16:45:43 -07:00
ehci-tegra.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-tilegx.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-timer.c USB: EHCI: improve interrupt qh unlink 2013-08-12 11:43:48 -07:00
ehci-w90x900.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci-xilinx-of.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ehci.h usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
fhci-dbg.c
fhci-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fotg210-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
fotg210.h fotg210: remove conditional compilation 2013-12-03 10:28:39 -08:00
fsl-mph-dr-of.c usb: host: fsl-mph-dr-of: Staticize local symbols 2013-09-17 11:06:57 -05:00
fusbh200-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
fusbh200.h fusb200h: always compile in debugfs support 2013-12-03 10:31:21 -08:00
hwa-hc.c usb: wusbcore: use USB_CTRL_SET_TIMEOUT and USB_CTRL_GET_TIMEOUT 2013-12-09 13:28:48 -08:00
imx21-dbg.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
imx21-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
imx21-hcd.h usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
isp116x-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
isp116x.h USB: isp116x: remove dependency on CONFIG_USB_DEBUG 2013-07-23 16:35:17 -07:00
isp1362-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
isp1362.h USB: isp1362: move debug files from proc to debugfs 2013-07-24 14:43:05 -07:00
isp1760-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
isp1760-hcd.h
isp1760-if.c USB: host: use dev_get_platdata() 2013-07-31 17:53:50 -07:00
Kconfig usb: ohci: remove ep93xx bus glue platform driver 2013-10-29 16:43:37 -07:00
Makefile usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
octeon2-common.c
ohci-at91.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-da8xx.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-dbg.c ohci: remove conditional compilation 2013-12-03 10:25:22 -08:00
ohci-exynos.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-hcd.c USB: OHCI: Properly handle OHCI controller suspend 2013-12-08 17:53:17 -08:00
ohci-hub.c ohci: no conditional debugging in root hub hadling 2013-12-03 10:25:22 -08:00
ohci-jz4740.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-mem.c
ohci-nxp.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-octeon.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-omap3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-omap.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-pci.c usb: ohci: use amd_chipset_type to filter for SB800 prefetch 2013-10-03 15:44:51 -07:00
ohci-platform.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-ppc-of.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-ps3.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-pxa27x.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-q.c ohci: kill ohci_vdbg 2013-12-03 10:25:22 -08:00
ohci-s3c2410.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-sa1111.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-sm501.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-spear.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-tilegx.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci-tmio.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
ohci.h ohci: kill ohci_vdbg 2013-12-03 10:25:22 -08:00
oxu210hp-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
oxu210hp.h
pci-quirks.c Merge 3.12-rc6 into usb-next. 2013-10-19 13:19:07 -07:00
pci-quirks.h usb: ohci: use amd_chipset_type to filter for SB800 prefetch 2013-10-03 15:44:51 -07:00
r8a66597-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
r8a66597.h
sl811_cs.c
sl811-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
sl811.h USB: sl811: move debug files from proc to debugfs 2013-07-24 14:43:05 -07:00
ssb-hcd.c DMA-API: usb: ssb-hcd: replace dma_set_mask()+dma_set_coherent_mask() with new helper 2013-10-31 14:48:36 +00:00
u132-hcd.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
uhci-debug.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
uhci-grlib.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
uhci-hcd.c usb: kill DEBUG compile option 2013-12-03 10:34:33 -08:00
uhci-hcd.h
uhci-hub.c USB/host: Bugfix: Return length of copied buffer in uhci_hub_control() 2013-10-07 00:07:17 -07:00
uhci-pci.c USB: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-04 16:58:47 -08:00
uhci-platform.c usb: hcd: move controller wakeup setting initialization to individual driver 2013-12-08 18:06:46 -08:00
uhci-q.c USB: UHCI: accept very late isochronous URBs 2013-09-25 17:05:34 -07:00
xhci-dbg.c xhci: replace xhci_read_64() with readq() 2013-12-02 12:59:49 -08:00
xhci-ext-caps.h xhci: fix port BESL LPM capability checking 2013-08-27 08:54:42 -07:00
xhci-hub.c xhci: replace xhci_writel() with writel() 2013-12-02 12:59:49 -08:00
xhci-mem.c xhci: replace xhci_write_64() with writeq() 2013-12-02 12:59:50 -08:00
xhci-pci.c usb: xhci: change enumeration scheme to 'new scheme' by default 2013-12-10 13:54:37 -08:00
xhci-plat.c usb: xhci: change enumeration scheme to 'new scheme' by default 2013-12-10 13:54:37 -08:00
xhci-ring.c usb: xhci: change enumeration scheme to 'new scheme' by default 2013-12-10 13:54:37 -08:00
xhci-trace.c xhci: add traces for debug messages in xhci_address_device() 2013-08-13 16:05:38 -07:00
xhci-trace.h xhci: fix sparse warning in xhci-trace.h 2013-12-02 12:59:45 -08:00
xhci.c usb: xhci: change enumeration scheme to 'new scheme' by default 2013-12-10 13:54:37 -08:00
xhci.h usb: xhci: change enumeration scheme to 'new scheme' by default 2013-12-10 13:54:37 -08:00