This is a note to let you know that I've just added the patch titled
PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set
to the 3.0-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-fix-rpm_resume-return-value-for-power.no_callbacks-set.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 7f321c26c04807834fef4c524d2b21573423fc74 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 15 Aug 2012 21:31:45 +0200
Subject: PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set
From: "Rafael J. Wysocki" <[email protected]>
commit 7f321c26c04807834fef4c524d2b21573423fc74 upstream.
For devices whose power.no_callbacks flag is set, rpm_resume()
should return 1 if the device's parent is already active, so that
the callers of pm_runtime_get() don't think that they have to wait
for the device to resume (asynchronously) in that case (the core
won't queue up an asynchronous resume in that case, so there's
nothing to wait for anyway).
Modify the code accordingly (and make sure that an idle notification
will be queued up on success, even if 1 is to be returned).
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -533,6 +533,7 @@ static int rpm_resume(struct device *dev
|| dev->parent->power.runtime_status == RPM_ACTIVE) {
atomic_inc(&dev->parent->power.child_count);
spin_unlock(&dev->parent->power.lock);
+ retval = 1;
goto no_callback; /* Assume success. */
}
spin_unlock(&dev->parent->power.lock);
@@ -610,7 +611,7 @@ static int rpm_resume(struct device *dev
}
wake_up_all(&dev->power.wait_queue);
- if (!retval)
+ if (retval >= 0)
rpm_idle(dev, RPM_ASYNC);
out:
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/cpufreq-powernow-k8-workqueue-user-shouldn-t-migrate-the-kworker-to-another-cpu.patch
queue-3.0/workqueue-reimplement-work_on_cpu-using-system_wq.patch
queue-3.0/pm-runtime-clear-power.deferred_resume-on-success-in-rpm_suspend.patch
queue-3.0/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