lkml.org 
[lkml]   [2015]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] driver core: Ensure proper suspend/resume ordering
On Wed, 16 Sep 2015, Rafael J. Wysocki wrote:

> > The core prohibits new devices from being registered. It does not
> > prohibit probes of existing devices, because they currently do not
> > affect the dpm_list.
>
> Which may be a mistake, because it does affect callbacks executed during
> suspend/resume (after successful probe the device potentially has a different
> set of PM callbacks than before).
>
> > In general, we rely on subsystems not to do any probing once a device
> > is suspended. It's probably reasonable to ask them not to do any
> > probing once a device has gone through the "prepare" stage.
>
> Right.
>
> Question is when it should be allowed to probe again. I guess at the same
> time we allow registrations to to take place again?

That would make the most sense. Particularly since registration
automatically causes probing to occur.

Now, we do allow registration below a device as soon as the ->resume
callback returns, whereas devices don't get added back to the dpm_list
until after the "complete" phase is totally finished. If a
previously-existing device gets probed in between, it would be moved
off the dpm_prepared_list before its ->complete callback was invoked,
which means its ->complete wouldn't get called at all.

Perhaps this would be okay; it depends on the subsystem.

Alan Stern



\
 
 \ /
  Last update: 2015-09-16 19:21    [W:0.106 / U:1.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site