* Patch "Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"" has been added to the 4.5-stable tree
@ 2016-05-08 13:05 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-05-08 13:05 UTC (permalink / raw)
To: johan, gregkh, stern; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-usb-pm-allow-usb-devices-to-remain-runtime-suspended-when-sleeping.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 9be427efc764464fbcbc1ca3f0d34f575cb0f037 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@kernel.org>
Date: Mon, 2 May 2016 15:35:57 +0200
Subject: Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"
From: Johan Hovold <johan@kernel.org>
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>
---
drivers/usb/core/port.c | 6 ------
drivers/usb/core/usb.c | 8 +-------
2 files changed, 1 insertion(+), 13 deletions(-)
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -249,18 +249,12 @@ static int usb_port_runtime_suspend(stru
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
};
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -311,13 +311,7 @@ static int usb_dev_uevent(struct device
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)
Patches currently in stable-queue which might be from johan@kernel.org are
queue-4.5/revert-usb-pm-allow-usb-devices-to-remain-runtime-suspended-when-sleeping.patch
queue-4.5/usb-serial-cp210x-add-id-for-link-ecu.patch
queue-4.5/usb-serial-cp210x-add-straizona-focusers-device-ids.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-08 13:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-08 13:05 Patch "Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"" has been added to the 4.5-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).