EHCI: keep track of ports being resumed and indicate in hub_status_data
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 3 Apr 2012 19:24:30 +0000 (15:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Apr 2012 22:43:21 +0000 (15:43 -0700)
commita448e4dc25303fe551e4dafe16c8c7c34f1b9d82
treef5ae9b654defe5170fd5be0146888f57fde54751
parent879d38e6bc36d73b0ac40ec9b0d839fda9fa8b1a
EHCI: keep track of ports being resumed and indicate in hub_status_data

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

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: Chen Peter-B29397 <B29397@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci.h