USB: fix remote wakeup settings during system sleep
commit5f677f1d45b2bf08085bbba7394392dfa586fa8e
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 2 Apr 2010 17:20:11 +0000 (2 13:20 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Apr 2010 22:18:27 +0000 (22 15:18 -0700)
tree0eeec0555c343b11adaee5f9f418f58a083c6273
parent9a61d72602771906e11a5944e8571f8006387b39
USB: fix remote wakeup settings during system sleep

This patch (as1363) changes the way USB remote wakeup is handled
during system sleeps.  It won't be enabled unless an interface driver
specifically needs it.  Also, it won't be enabled during the FREEZE or
QUIESCE phases of hibernation, when the system doesn't respond to
wakeup events anyway.  Finally, if the device is already
runtime-suspended with remote wakeup enabled, but wakeup is supposed
to be disabled for the system sleep, the device gets woken up so that
it can be suspended again with the proper wakeup setting.

This will fix problems people have reported with certain USB webcams
that generate wakeup requests when they shouldn't, and as a result
cause system suspends to fail.  See

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/515109

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Erik Andrén <erik.andren@gmail.com>
CC: <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/driver.c