Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)



On Wed, 2 Apr 2008, Oliver Neukum wrote:

Am Mittwoch, 2. April 2008 17:13:11 schrieb Alan Stern:
Basically yes.  Subsystems and drivers are allowed to keep devices
suspended if they were suspended before the system went to sleep.  
Remember, the purpose of the resume method is to let drivers know that
the system is now awake, not to force them to put their devices into a
high-power state.

Well, sometimes it is exactly that what we desire, eg. as a side effect
of lsusb. Should the callbacks have different semantics depending on
the reason you call them? And how should that information be transferred?

Which callbacks are you referring to? When lsusb opens a device and
does an autoresume, it does not call the same routine as the PM core
does when resuming from a system sleep. lsusb ends up calling
usb_autoresume_device() whereas the PM core ends up calling
usb_resume(), which is the function you quoted earlier.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)
    ... suspended if they were suspended before the system went to sleep. ... of lsusb. ... it does not call the same routine as the PM core ... usb_autoresume_devicewhereas the PM core ends up calling ...
    (Linux-Kernel)
  • Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)
    ... suspended if they were suspended before the system went to sleep. ... of lsusb. ... it does not call the same routine as the PM core ... Why not put it into generic code? ...
    (Linux-Kernel)
  • Re: [linux-pm] [RFC][PATCH] PM: Introduce new top level =?iso-8859-1?q?suspend=09and_hib
    ... failure to resume is just a limited subcase of a device vanishing during ...  If a device vanishes during sleep, ... the PM core must not wake its children. ... drivers can wake their devices. ...
    (Linux-Kernel)
  • Re: Re-entrancy???
    ... If Do Events didn't yield then obviously the loop would make the entire system unresponsive whilst it was running. ... Admit that adding Sleep 1 avoid that even if you don't like it and don't recomend it, and i'll say OK, it is your opinion. ... He then attempts to read from a PLC and loops with a DoEvents if the data is not ready. ... As I said earlier the most it will do is utilize the processor core it is running on, only for the duration of that loop, which is max of 250 ms. ...
    (microsoft.public.vb.general.discussion)
  • Re: How do I Sleep for a specified amount of time and relinquish c
    ... is not relinquishing control to ... Sleepas implemented by the .NET Framework had better just be calling the ... Windows API function Sleep(). ... effect of "specify 0 to relinquish control to runnable threads". ...
    (microsoft.public.dotnet.framework)