]> git.baikalelectronics.ru Git - kernel.git/commit
xHCI: keep track of ports being resumed and indicate in hub_status_data
authorAndiry Xu <andiry.xu@amd.com>
Fri, 13 Apr 2012 18:54:30 +0000 (02:54 +0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 3 May 2012 20:10:17 +0000 (13:10 -0700)
commit05cf51ae7d0f703d38f7699a7720df1f14d968ef
tree65353e2712388752b40769ca6e53bdb7147a0d20
parentee29ea3bb79c7116fddec57ad1a55b313b663fe8
xHCI: keep track of ports being resumed and indicate in hub_status_data

This commit adds a bit-array to xhci bus_state for keeping track of
which ports are undergoing a resume transition. If any of the bits
are set when xhci_hub_status_data() is called, the routine will return
a non-zero value even if no ports have any status changes pending.
This will allow usbcore to handle races between root-hub suspend and
port wakeup.

This patch should be backported to kernels as old as 3.4, that contain
the commit 0d163da0521b7b186107e181bba55180b0781de8 "USB: fix race
between root-hub suspend and remote wakeup".

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h