]> 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)
commit40a4c00e29d912528f788f995ce2523ec5c0db59
treefbafe9cb22849cf5431adc96cf2cf2872314f941
parent1000dbfb66302c3b206a940960873013b365f10f
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