From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: Re: [PATCH] swsusp: do not use pm_ops (was: Re: suspend2 merge (was: Re: CFS and suspend2: hang in atomic copy)) Date: Sat, 5 May 2007 00:31:50 +0200 Message-ID: <200705050031.51141.rjw@sisk.pl> References: <200705042355.19145.rjw@sisk.pl> <200705041512.16087.david-b@pacbell.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200705041512.16087.david-b@pacbell.net> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: David Brownell Cc: linux-pm@lists.linux-foundation.org, Pekka Enberg , Johannes Berg , Pavel Machek , Nigel Cunningham List-Id: linux-pm@vger.kernel.org On Saturday, 5 May 2007 00:12, David Brownell wrote: > On Friday 04 May 2007, Rafael J. Wysocki wrote: > > On Friday, 4 May 2007 23:23, Johannes Berg wrote: > > > On Fri, 2007-05-04 at 23:11 +0200, Rafael J. Wysocki wrote: > > > > > > > Actually, prethaw is to prevent drivers loaded before the image is restored > > > > from doing unreasonable things. It doesn't have any effect on the drivers' > > > > .resume() routines. > > > > > > Oh, but it can, you could have a flag in your driver saying "the next > > > resume is after restore" and you set that flag in prethaw. > > > > No, you should have set that flag in .suspend(), really. :-) > > That doesn't work very well. Not only does suspend() not > know the target state, but you don't want to trash the > controller state if you're getting resumed after some kind > of fault in the suspend-to-disk path... > > I'm hoping that explains the smiley! Yes, among other things (like that passing anything from prethaw to .resume() really doesn't work unless the data are stored in a device ;-)). Greetings, Rafael