lkml.org 
[lkml]   [2012]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUGFIX] PM: Fix active child counting when disabled and forbidden
On Wed, 14 Nov 2012, Huang Ying wrote:

> > What changes specifically do you mean to be precise?
>
> I mean the following changes from Alan's email.
>
> pm_runtime_set_suspended should fail if dev->power.runtime_auto
> is clear.
>
> pm_runtime_forbid should call pm_runtime_set_active if
> dev->power.disable_depth > 0. (This would run into a problem
> if the parent is suspended and disabled. Maybe
> pm_runtime_forbid should fail when this happens.)
>
> For the second one, is it possible that the device is really in low
> power state when pm_runtime_forbid is called? That situation is hard to
> deal with too.

Yes, it is possible. I don't see what we can do about it. By
disabling the device, the driver has said that it doesn't want to
handle any runtime PM callbacks. Without the driver's help, there
isn't any good way to bring the device back to full power.

On the other hand, the PM core doesn't know the device's actual power
state. All it knows is the value of dev->power.runtime_status. So it
doesn't have any way to detect when this problem occurs.

Alan Stern



\
 
 \ /
  Last update: 2012-11-14 17:41    [W:0.062 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site