linux/drivers/usb/core
Luben Tuikov 07194ab7be USB: Reset USB 3.0 devices on (re)discovery
If the device isn't reset, the XHCI HCD sends
SET ADDRESS to address 0 while the device is
already in Addressed state, and the request is
dropped on the floor as it is addressed to the
default address. This sequence of events, which this
patch fixes looks like this:

usb_reset_and_verify_device()
	hub_port_init()
		hub_set_address()
			SET_ADDRESS to 0 with 1
		usb_get_device_descriptor(udev, 8)
		usb_get_device_descriptor(udev, 18)
	descriptors_changed() --> goto re_enumerate:
		hub_port_logical_disconnect()
			kick_khubd()

And then:

hub_events()
	hub_port_connect_change()
		usb_disconnect()
			usb_disable_device()
		new device struct
		sets device state to Powered
		choose_address()
		hub_port_init() <-- no reset, but SET ADDRESS to 0 with 1, timeout!

The solution is to always reset the device in
hub_port_init() to put it in a known state.

Note from Sarah Sharp:

This patch should be queued for stable trees all the way back to 2.6.34,
since that was the first kernel that supported configured device reset.
The code this patch touches has been there since 2.6.32, but the bug
would never be hit before 2.6.34 because the xHCI driver would
completely reject an attempt to reset a configured device under xHCI.

Signed-off-by: Luben Tuikov <ltuikov@yahoo.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
2011-02-20 07:07:04 -08:00
..
Kconfig kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT 2011-01-20 17:02:05 -08:00
Makefile usb: makefile cleanup 2010-10-22 10:22:07 -07:00
buffer.c USB: make hcd.h public (drivers dependency) 2010-05-20 13:21:30 -07:00
config.c USB: remove the usb_host_ss_ep_comp structure 2010-05-20 13:21:40 -07:00
devices.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
devio.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
driver.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 2011-01-10 08:14:53 -08:00
endpoint.c usb: set ep_dev async suspend should be later than device_initialize 2011-01-22 18:36:42 -08:00
file.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
generic.c USB: accept RNDIS configs if there's no alternative 2010-08-10 14:35:43 -07:00
hcd-pci.c xHCI: synchronize irq in xhci_suspend() 2011-01-14 15:28:52 -08:00
hcd.c USB: fix race between root-hub resume and wakeup requests 2011-02-03 16:46:48 -08:00
hub.c USB: Reset USB 3.0 devices on (re)discovery 2011-02-20 07:07:04 -08:00
inode.c fs: dcache remove dcache_lock 2011-01-07 17:50:23 +11:00
message.c USB: make usb_mark_last_busy use pm_runtime_mark_last_busy 2010-11-16 14:02:54 -08:00
notify.c
otg_whitelist.h
quirks.c USB: Add quirk for Samsung Android phone modem 2011-02-17 10:30:24 -08:00
sysfs.c USB: use the runtime-PM autosuspend implementation 2010-11-16 14:03:41 -08:00
urb.c USB: output an error message when the pipe type doesn't match the endpoint type 2010-10-22 10:21:27 -07:00
usb.c USB: use the runtime-PM autosuspend implementation 2010-11-16 14:03:41 -08:00
usb.h USB: use the runtime-PM autosuspend implementation 2010-11-16 14:03:41 -08:00