Messages in this thread | | | Date | Wed, 16 Sep 2015 12:58:18 -0400 (EDT) | From | Alan Stern <> | Subject | Re: [PATCH] driver core: Ensure proper suspend/resume ordering |
| |
On Wed, 16 Sep 2015, Grygorii Strashko 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. > > Seems I missed smth, but I can't find the place in Kernel that prohibits > creation of new devices during suspend. > > Could someone point me on, please?
In Documentation/power/devices.txt, there is a section describing the various phases of system suspend. The part about the "prepare" phase says:
1. The prepare phase is meant to prevent races by preventing new devices from being registered; the PM core would never know that all the children of a device had been suspended if new children could be registered at will. (By contrast, devices may be unregistered at any time.) Unlike the other suspend-related phases, during the prepare phase the device tree is traversed top-down.
After the prepare callback method returns, no new children may be registered below the device. The method may also prepare the device or driver in some way for the upcoming system power transition, but it should not put the device into a low-power state.
Alan Stern
| |