This is a note to let you know that I've just added the patch titled
PM / Runtime: Check device PM QoS setting before "no callbacks" check
to the 3.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:
pm-runtime-check-device-pm-qos-setting-before-no-callbacks-check.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 55d7ec4520e86d735d178c15d7df33d507bd43c6 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 15 Aug 2012 21:32:04 +0200
Subject: PM / Runtime: Check device PM QoS setting before "no callbacks" check
From: "Rafael J. Wysocki" <[email protected]>
commit 55d7ec4520e86d735d178c15d7df33d507bd43c6 upstream.
If __dev_pm_qos_read_value(dev) returns a negative value,
rpm_suspend() should return -EPERM for dev even if its
power.no_callbacks flag is set. For this to happen, the device's
power.no_callbacks flag has to be checked after the PM QoS check,
so move the PM QoS check to rpm_check_suspend_allowed() (this will
make it cover idle notifications as well as runtime suspend too).
Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/base/power/runtime.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -147,6 +147,8 @@ static int rpm_check_suspend_allowed(str
|| (dev->power.request_pending
&& dev->power.request == RPM_REQ_RESUME))
retval = -EAGAIN;
+ else if (__dev_pm_qos_read_value(dev) < 0)
+ retval = -EPERM;
else if (dev->power.runtime_status == RPM_SUSPENDED)
retval = 1;
@@ -402,12 +404,6 @@ static int rpm_suspend(struct device *de
goto out;
}
- if (__dev_pm_qos_read_value(dev) < 0) {
- /* Negative PM QoS constraint means "never suspend". */
- retval = -EPERM;
- goto out;
- }
-
__update_runtime_status(dev, RPM_SUSPENDING);
if (dev->pm_domain)
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/acpi-pm-fix-resource_lock-dead-lock-in-acpi_power_on_device.patch
queue-3.5/acpi-pm-infer-parent-power-state-from-child-if-unknown-v2.patch
queue-3.5/acpi-pm-use-kern_debug-when-no-power-resources-are-found.patch
queue-3.5/cpufreq-powernow-k8-workqueue-user-shouldn-t-migrate-the-kworker-to-another-cpu.patch
queue-3.5/pm-runtime-check-device-pm-qos-setting-before-no-callbacks-check.patch
queue-3.5/workqueue-reimplement-work_on_cpu-using-system_wq.patch
queue-3.5/pm-runtime-clear-power.deferred_resume-on-success-in-rpm_suspend.patch
queue-3.5/pm-runtime-fix-rpm_resume-return-value-for-power.no_callbacks-set.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html