linux/drivers/usb/core
Alan Stern e583d9db99 USB: global suspend and remote wakeup don't mix
The hub driver was recently changed to use "global" suspend for system
suspend transitions on non-SuperSpeed buses.  This means that we don't
suspend devices individually by setting the suspend feature on the
upstream hub port; instead devices all go into suspend automatically
when the root hub stops transmitting packets.  The idea was to save
time and to avoid certain kinds of wakeup races.

Now it turns out that many hubs are buggy; they don't relay wakeup
requests from a downstream port to their upstream port if the
downstream port's suspend feature is not set (depending on the speed
of the downstream port, whether or not the hub is enabled for remote
wakeup, and possibly other factors).

We can't have hubs dropping wakeup requests.  Therefore this patch
goes partway back to the old policy: It sets the suspend feature for a
port if the device attached to that port or any of its descendants is
enabled for wakeup.  People will still be able to benefit from the
time savings if they don't care about wakeup and leave it disabled on
all their devices.

In order to accomplish this, the patch adds a new field to the usb_hub
structure: wakeup_enabled_descendants is a count of how many devices
below a suspended hub are enabled for remote wakeup.  A corresponding
new subroutine determines the number of wakeup-enabled devices at or
below an arbitrary suspended USB device.

This should be applied to the 3.10 stable kernel.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: Toralf Förster <toralf.foerster@gmx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-16 15:33:02 -07:00
..
buffer.c USB: Core: Fix minor coding style issues 2011-01-22 19:35:39 -08:00
config.c usb: Fail a get config when the port is powered off. 2012-09-10 13:04:01 -07:00
devices.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-02-26 20:16:07 -08:00
devio.c Merge 3.10-rc5 into usb-next 2013-06-08 21:27:51 -07:00
driver.c PM / Runtime: Rework the "runtime idle" helper routine 2013-06-03 21:49:52 +02:00
endpoint.c usb/endpoint: Set release callback in the struct device_type instead of in the device itself directly 2012-08-20 14:38:08 -07:00
file.c USB: fix PTR_ERR translation in init_usb_class() 2013-06-06 12:14:38 -07:00
generic.c USB: avoid error messages when a device is disconnected 2013-03-28 11:05:52 -07:00
hcd-pci.c USB: improve port transitions when EHCI starts up 2013-03-28 14:45:57 -07:00
hcd.c Allow the USB HCD to create Wireless USB root hubs 2013-06-03 10:52:40 -07:00
hub.c USB: global suspend and remote wakeup don't mix 2013-07-16 15:33:02 -07:00
hub.h USB: global suspend and remote wakeup don't mix 2013-07-16 15:33:02 -07:00
Kconfig USB: remove remaining instances of USB_SUSPEND 2013-05-15 13:44:44 -04:00
Makefile usb: Add driver/usb/core/(port.c,hub.h) files 2013-01-18 15:49:00 -08:00
message.c usb: message: Fixed parenthesis error in sizeof function. 2013-05-17 10:09:26 -07:00
notify.c usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:25 -04:00
otg_whitelist.h
port.c Power management and ACPI updates for 3.11-rc1 2013-07-03 14:35:40 -07:00
quirks.c USB: reset resume quirk needed by a hub 2013-05-16 17:28:28 -07:00
sysfs.c usb: add usb2 Link PM variables to sysfs and usb_device 2013-06-05 16:48:40 -07:00
urb.c USB: fix urb-poison imbalance 2013-03-25 13:48:27 -07:00
usb-acpi.c usb/acpi: binding xhci root hub usb port with ACPI 2013-03-25 10:39:17 -07:00
usb.c usb: ehci: Only sleep for post-resume handover if devices use persist 2013-05-20 11:28:55 -07:00
usb.h USB: remove CONFIG_USB_SUSPEND option 2013-03-28 11:10:22 -07:00