From: Oliver Neukum Subject: Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6) Date: Wed, 2 Apr 2008 22:11:35 +0200 Message-ID: <200804022211.36438.oliver@neukum.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from smtp-out003.kontent.com ([81.88.40.217]:46797 "EHLO smtp-out003.kontent.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753827AbYDBUMU convert rfc822-to-8bit (ORCPT ); Wed, 2 Apr 2008 16:12:20 -0400 In-Reply-To: Content-Disposition: inline Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Alan Stern Cc: "Rafael J. Wysocki" , Nigel Cunningham , pm list , ACPI Devel Maling List , Greg KH , Len Brown , LKML , Alexey Starikovskiy , David Brownell , Pavel Machek , Benjamin Herrenschmidt Am Mittwoch, 2. April 2008 18:42:15 schrieb Alan Stern: > On Wed, 2 Apr 2008, Oliver Neukum wrote: >=20 > > Am Mittwoch, 2. April 2008 17:13:11 schrieb Alan Stern: > > > Basically yes. =A0Subsystems and drivers are allowed to keep devi= ces > > > suspended if they were suspended before the system went to sleep.= =A0 > > > 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 i= nto a > > > high-power state. > >=20 > > Well, sometimes it is exactly that what we desire, eg. as a side ef= fect > > of lsusb. Should the callbacks have different semantics depending o= n > > the reason you call them? And how should that information be transf= erred? >=20 > 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. But how is usb_autoresume_device() supposed to take to the driver? =46urthermore suppose the interface woken up is storage. This will have to work across subsystem borders. Why not put it into generic code? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html