On Fri, 4 May 2007, 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. You're both wrong. PRETHAW is to prevent drivers present in the image from doing reasonable-but-wrong things (because they were misled by actions taken by the boot kernel or the BIOS before the image was restored). It gives the boot kernel's driver a chance to put the device in a state which won't be misleading. And while you could have a flag in your driver saying "the next resume is after restore", setting it during PRETHAW would accomplish nothing. PRETHAW occurs immediately before the image is restored, which means the flag would get overwritten by the contents of the image. Alan Stern _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm