]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: XHCI: resume root hubs when the controller resumes
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 3 Nov 2011 15:37:10 +0000 (11:37 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 26 Nov 2011 17:08:37 +0000 (09:08 -0800)
commit78c5cd61577b370e47eaf8e8405c63fb3f5b8921
treed21635a66e9d063fa00ed2fa664573abb45f5a1b
parent6b17329bbf8b902dcd1f5a0f94d43f902b72f682
USB: XHCI: resume root hubs when the controller resumes

commit f69e3120df82391a0ee8118e0a156239a06b2afb upstream.

This patch (as1494) fixes a problem in xhci-hcd's resume routine.
When the controller is runtime-resumed, this can only mean that one of
the two root hubs has made a wakeup request and therefore needs to be
resumed as well.  Rather than try to determine which root hub requires
attention (which might be difficult in the case where a new
non-SuperSpeed device has been plugged in), the patch simply resumes
both root hubs.

Without this change, there is a race: The controller might be put back
to sleep before it can activate its IRQ line, and the wakeup condition
might never get handled.

The patch also simplifies the logic in xhci_resume a little, combining
some repeated flag settings into a single pair of statements.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci.c