diff options
author | Johan Hovold <johan@kernel.org> | 2016-05-02 15:35:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-11 11:21:37 +0200 |
commit | dc19120c1cfd7bc8ae59776ad9f48ffdf37d7c7d (patch) | |
tree | a14fc8eb2f9f9bbca5c5ffecd7ce1d62384a8bd1 | |
parent | c0947948aed5b84aaf54a7757bf899d80d2079fe (diff) | |
download | lwn-dc19120c1cfd7bc8ae59776ad9f48ffdf37d7c7d.tar.gz lwn-dc19120c1cfd7bc8ae59776ad9f48ffdf37d7c7d.zip |
Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"
commit 9be427efc764464fbcbc1ca3f0d34f575cb0f037 upstream.
This reverts commit e3345db85068ddb937fc0ba40dfc39c293dad977, which
broke system resume for a large class of devices.
Devices that after having been reset during resume need to be rebound
due to a missing reset_resume callback, are now left in a suspended
state. This specifically broke resume of common USB-serial devices,
which are now unusable after system suspend (until disconnected and
reconnected) when USB persist is enabled.
During resume, usb_resume_interface will set the needs_binding flag for
such interfaces, but unlike system resume, run-time resume does not
honour it.
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/core/port.c | 6 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 8 |
2 files changed, 1 insertions, 13 deletions
diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c index 14718a9ffcfb..460c855be0d0 100644 --- a/drivers/usb/core/port.c +++ b/drivers/usb/core/port.c @@ -249,18 +249,12 @@ static int usb_port_runtime_suspend(struct device *dev) return retval; } - -static int usb_port_prepare(struct device *dev) -{ - return 1; -} #endif static const struct dev_pm_ops usb_port_pm_ops = { #ifdef CONFIG_PM .runtime_suspend = usb_port_runtime_suspend, .runtime_resume = usb_port_runtime_resume, - .prepare = usb_port_prepare, #endif }; diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index ebb29caa3fe4..77e4c9bc0ab1 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -311,13 +311,7 @@ static int usb_dev_uevent(struct device *dev, struct kobj_uevent_env *env) static int usb_dev_prepare(struct device *dev) { - struct usb_device *udev = to_usb_device(dev); - - /* Return 0 if the current wakeup setting is wrong, otherwise 1 */ - if (udev->do_remote_wakeup != device_may_wakeup(dev)) - return 0; - - return 1; + return 0; /* Implement eventually? */ } static void usb_dev_complete(struct device *dev) |