linux/drivers/usb/host
Paul Zimmerman 7a3783efff xhci: Fix reset-device and configure-endpoint commands
We have been having problems with the USB-IF Gold Tree tests when plugging
and unplugging devices from the tree. I have seen that the reset-device
and configure-endpoint commands, which are invoked from
xhci_discover_or_reset_device() and xhci_configure_endpoint(), will sometimes
time out.

After much debugging, I determined that the commands themselves do not actually
time out, but rather their completion events do not get delivered to the right
place.

This happens when the command ring has just wrapped around, and it's enqueue
pointer is left pointing to the link TRB. xhci_discover_or_reset_device() and
xhci_configure_endpoint() use the enqueue pointer directly as their command
TRB pointer, without checking whether it's pointing to the link TRB.

When the completion event arrives, if the command TRB is pointing to the link
TRB, the check against the command ring dequeue pointer in
handle_cmd_in_cmd_wait_list() fails, so the completion inside the command does
not get signaled.

The patch below fixes the timeout problem for me.

This should be queued for the 2.6.35 and 2.6.36 stable trees.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2010-11-19 16:23:07 -08:00
..
whci usb: makefile cleanup 2010-10-22 10:22:07 -07:00
ehci-atmel.c USB: ehci-atmel.c: use resource_size() 2010-03-02 14:53:18 -08:00
ehci-au1xxx.c USB: add do_wakeup parameter for PCI HCD suspend 2010-08-10 14:35:37 -07:00
ehci-dbg.c USB: ehci: fix debugfs 'lpm' permissions 2010-11-15 14:04:14 -08:00
ehci-fsl.c USB: add USB EHCI support for MPC5121 SoC 2010-10-22 10:21:58 -07:00
ehci-fsl.h USB: add USB EHCI support for MPC5121 SoC 2010-10-22 10:21:58 -07:00
ehci-hcd.c USB: EHCI: fix obscure race in ehci_endpoint_disable 2010-11-16 13:36:41 -08:00
ehci-hub.c USB: controller resume should check the root hub 2010-08-10 14:35:37 -07:00
ehci-ixp4xx.c
ehci-lpm.c USB: EHCI: EHCI 1.1 addendum: Basic LPM feature support 2010-08-10 14:35:35 -07:00
ehci-mem.c USB: EHCI: AMD periodic frame list table quirk 2010-11-16 13:36:40 -08:00
ehci-mxc.c USB: ehci/mxc: compile fix 2010-11-11 06:56:17 -08:00
ehci-octeon.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ehci-omap.c USB: ehci_omap: fix device detect issue with modules 2010-08-10 14:35:39 -07:00
ehci-orion.c USB: ehci-orion.c: use resource_size() 2010-03-02 14:53:17 -08:00
ehci-pci.c USB: EHCI: AMD periodic frame list table quirk 2010-11-16 13:36:40 -08:00
ehci-ppc-of.c USB: ehci-ppc-of: problems in unwind 2010-09-03 17:33:40 -07:00
ehci-ps3.c
ehci-q.c USB: convert usb_hcd bitfields into atomic flags 2010-08-10 14:35:37 -07:00
ehci-sched.c USB: EHCI: AMD periodic frame list table quirk 2010-11-16 13:36:40 -08:00
ehci-w90x900.c
ehci-xilinx-of.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
ehci.h USB: EHCI: AMD periodic frame list table quirk 2010-11-16 13:36:40 -08:00
fhci-dbg.c USB: make hcd.h public (drivers dependency) 2010-05-20 13:21:30 -07:00
fhci-hcd.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
fhci-hub.c USB: make hcd.h public (drivers dependency) 2010-05-20 13:21:30 -07:00
fhci-mem.c USB: make hcd.h public (drivers dependency) 2010-05-20 13:21:30 -07:00
fhci-q.c USB: make hcd.h public (drivers dependency) 2010-05-20 13:21:30 -07:00
fhci-sched.c fix comment/printk typos concerning "already" 2010-07-11 21:45:40 +02:00
fhci-tds.c USB: make hcd.h public (drivers dependency) 2010-05-20 13:21:30 -07:00
fhci.h USB: FHCI: cq_get() should check kfifo_out()'s return value 2010-05-20 13:21:46 -07:00
fsl-mph-dr-of.c USB: add USB EHCI support for MPC5121 SoC 2010-10-22 10:21:58 -07:00
hwa-hc.c USB: convert usb_hcd bitfields into atomic flags 2010-08-10 14:35:37 -07:00
imx21-dbg.c
imx21-hcd.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
imx21-hcd.h USB: imx21-hcd accept arbitary transfer buffer alignement. 2010-10-22 10:22:03 -07:00
isp116x-hcd.c USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro 2010-10-22 10:22:14 -07:00
isp116x.h
isp1362-hcd.c USB: isp1362-hcd - fix section mismatch warning 2010-11-16 13:36:41 -08:00
isp1362.h USB: host: Remove dead CONFIG_ARCH_KARO 2010-08-10 14:35:40 -07:00
isp1760-hcd.c USB: isp1760: use a write barrier to ensure proper ndelay timing 2010-08-23 20:50:15 -07:00
isp1760-hcd.h
isp1760-if.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
Kconfig USB: Fix FSL USB driver on non Open Firmware systems 2010-11-11 06:55:35 -08:00
Makefile USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
octeon2-common.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ohci-at91.c USB: ohci-at91: fix power management hanging 2010-04-30 09:25:12 -07:00
ohci-au1xxx.c
ohci-da8xx.c USB: OHCI: DA8xx/OMAP-L1x: fix up macro rename 2010-04-22 15:18:24 -07:00
ohci-dbg.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
ohci-ep93xx.c
ohci-hcd.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ohci-hub.c USB: controller resume should check the root hub 2010-08-10 14:35:37 -07:00
ohci-jz4740.c USB: ohci-jz4740: Fix spelling in MODULE_ALIAS 2010-11-11 07:14:07 -08:00
ohci-lh7a404.c USB: Convert concatenated __FILE__ to %s, __FILE__ 2010-03-02 14:54:59 -08:00
ohci-mem.c
ohci-octeon.c USB: Add EHCI and OHCH glue for OCTEON II SOCs. 2010-10-29 19:08:44 +01:00
ohci-omap.c
ohci-omap3.c USB: ohci: introduce omap3 ohci-hcd driver 2010-05-20 13:21:44 -07:00
ohci-pci.c OHCI: work around for nVidia shutdown problem 2010-10-22 10:21:36 -07:00
ohci-pnx4008.c i2c: Add support for custom probe function 2010-08-11 18:20:56 +02:00
ohci-pnx8550.c
ohci-ppc-of.c of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
ohci-ppc-soc.c USB: Convert concatenated __FILE__ to %s, __FILE__ 2010-03-02 14:54:59 -08:00
ohci-ps3.c
ohci-pxa27x.c ARM: ohci-pxa27x: enable OHCI over U2DC for pxa3xx 2010-10-08 16:21:17 +08:00
ohci-q.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ohci-s3c2410.c
ohci-sa1111.c USB: Convert concatenated __FILE__ to %s, __FILE__ 2010-03-02 14:54:59 -08:00
ohci-sh.c USB: ohci-sh - use resource_size instead of defining its own resource_len macro 2010-10-22 10:22:15 -07:00
ohci-sm501.c USB: ohci-sm501: add iounmap on error path 2010-10-22 10:21:35 -07:00
ohci-ssb.c USB: Add USB 2.0 to ssb ohci driver 2010-08-10 14:35:44 -07:00
ohci-tmio.c
ohci.h OHCI: work around for nVidia shutdown problem 2010-10-22 10:21:36 -07:00
oxu210hp-hcd.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
oxu210hp.h
pci-quirks.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2010-10-24 13:41:39 -07:00
pci-quirks.h
r8a66597-hcd.c usb: Fix up r8a66597-hcd section mismatches. 2010-09-16 17:16:31 +09:00
r8a66597.h usb: r8a66597-hcd: Change mistake of the outsw function 2010-10-22 10:22:11 -07:00
sl811-hcd.c usb: host: sl811-hcd: check kzalloc() result 2010-08-10 14:35:42 -07:00
sl811.h
sl811_cs.c pcmcia: move driver name to struct pcmcia_driver 2010-09-29 17:20:24 +02:00
u132-hcd.c drivers/usb: Remove unnecessary return's from void functions 2010-08-10 14:25:42 +02:00
uhci-debug.c USB: remove fake "address-of" expressions 2010-08-10 14:35:45 -07:00
uhci-hcd.c USB: remove fake "address-of" expressions 2010-08-10 14:35:45 -07:00
uhci-hcd.h USB: UHCI: add support for Intel's wakeup flags 2010-08-10 14:35:38 -07:00
uhci-hub.c USB: controller resume should check the root hub 2010-08-10 14:35:37 -07:00
uhci-q.c USB: UHCI: add native scatter-gather support(v1) 2010-10-22 10:22:00 -07:00
xhci-dbg.c USB: xhci: Correct assumptions about number of rings per endpoint. 2010-05-20 13:21:38 -07:00
xhci-ext-caps.h USB: xhci: Fix finding extended capabilities registers 2010-03-02 14:55:02 -08:00
xhci-hub.c usb: Fix linker errors with CONFIG_PM=n 2010-10-22 10:22:15 -07:00
xhci-mem.c xHCI: fix wMaxPacketSize mask 2010-11-11 10:47:08 -08:00
xhci-pci.c USB: xHCI: PCI power management implementation 2010-10-22 10:22:13 -07:00
xhci-ring.c xhci: Remove excessive printks with shared IRQs. 2010-11-11 10:32:32 -08:00
xhci.c xhci: Fix reset-device and configure-endpoint commands 2010-11-19 16:23:07 -08:00
xhci.h xHCI: fix wMaxPacketSize mask 2010-11-11 10:47:08 -08:00