Messages in this thread | | | Date | Wed, 16 Sep 2015 13:08:03 -0400 (EDT) | From | Alan Stern <> | Subject | Re: [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
| |