]> git.baikalelectronics.ru Git - kernel.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>
Mon, 14 Nov 2011 21:47:48 +0000 (13:47 -0800)
commit54bcf12778b4f97d02b37c63a030285897cb1775
treefbafe9cb22849cf5431adc96cf2cf2872314f941
parent61d56c0bdb34a3fe004e328918d674142d034744
USB: XHCI: resume root hubs when the controller resumes

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>
Cc: stable <stable@vger.kernel.org>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci.c