[lkml]   [2011]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH] Driver core: leave runtime PM enabled during system shutdown
    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 regression on some OMAP systems.

    Signed-off-by: Alan Stern <>
    Reported-by: NeilBrown <>
    CC: Chen Peter-B29397 <>


    drivers/base/core.c | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    Index: usb-3.2/drivers/base/core.c
    --- usb-3.2.orig/drivers/base/core.c
    +++ usb-3.2/drivers/base/core.c
    @@ -1743,8 +1743,10 @@ void device_shutdown(void)
    - /* 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");

     \ /
      Last update: 2011-12-06 16:29    [W:0.022 / U:23.180 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site