From: Greg Kroah-Hartman Date: Tue, 13 Mar 2012 19:35:52 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.0.25~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36d2e6cf9318dd1ca4b36947885a385bdf3fc40e;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: pm-driver-core-leave-runtime-pm-enabled-during-system-shutdown.patch --- diff --git a/queue-3.0/pm-driver-core-leave-runtime-pm-enabled-during-system-shutdown.patch b/queue-3.0/pm-driver-core-leave-runtime-pm-enabled-during-system-shutdown.patch new file mode 100644 index 00000000000..3bc66b307dd --- /dev/null +++ b/queue-3.0/pm-driver-core-leave-runtime-pm-enabled-during-system-shutdown.patch @@ -0,0 +1,51 @@ +From fe6b91f47080eb17d21cbf2a39311877d57f6938 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Tue, 6 Dec 2011 23:24:52 +0100 +Subject: PM / Driver core: leave runtime PM enabled during system shutdown + +From: Alan Stern + +commit fe6b91f47080eb17d21cbf2a39311877d57f6938 upstream. + +Disabling all runtime PM during system shutdown turns out not to be a +good idea, because some devices may need to be woken up from a +low-power state at that time. + +The whole point of disabling runtime PM for system shutdown was to +prevent untimely runtime-suspend method calls. This patch (as1504) +accomplishes the same result by incrementing the usage count for each +device and waiting for ongoing runtime-PM callbacks to finish. This +is what we already do during system suspend and hibernation, which +makes sense since the shutdown method is pretty much a legacy analog +of the pm->poweroff method. + +This fixes a recent regression on some OMAP systems introduced by +commit af8db1508f2c9f3b6e633e2d2d906c6557c617f9 (PM / driver core: +disable device's runtime PM during shutdown). + +Reported-and-tested-by: NeilBrown +Signed-off-by: Alan Stern +Acked-by: Greg Kroah-Hartman +Signed-off-by: Rafael J. Wysocki +Cc: Kostyantyn Shlyakhovoy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/base/core.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/base/core.c ++++ b/drivers/base/core.c +@@ -1743,8 +1743,10 @@ void device_shutdown(void) + */ + list_del_init(&dev->kobj.entry); + spin_unlock(&devices_kset->list_lock); +- /* Disable all device's runtime power management */ +- pm_runtime_disable(dev); ++ ++ /* Don't allow any more runtime suspends */ ++ pm_runtime_get_noresume(dev); ++ pm_runtime_barrier(dev); + + if (dev->bus && dev->bus->shutdown) { + dev_dbg(dev, "shutdown\n"); diff --git a/queue-3.0/series b/queue-3.0/series index 0c6458c9d97..ee0353f1046 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -5,3 +5,4 @@ x86-derandom-delay_tsc-for-64-bit.patch pci-ignore-pre-1.1-aspm-quirking-when-aspm-is-disabled.patch firewire-cdev-fix-32-bit-userland-on-64-bit-kernel-compat-corner-cases.patch firewire-core-handle-ack_busy-when-fetching-the-config-rom.patch +pm-driver-core-leave-runtime-pm-enabled-during-system-shutdown.patch