On Sat, 2009-01-24 at 09:46 -0500, Bob Copeland wrote: > > Good catch! Do we have to freeze the workqueue ourselves manually or > > something, to avoid drivers adding work to it? > > Yeah I guess so - it would only matter if they add work in one > of the callbacks we use to remove keys, interfaces, etc. This > might be a good case for the in_suspend flag. Or, we could just > flush the workqueue again at the end of suspend to make sure > nothing was added. True, just flushing it again is probably better. Best do it before the ->stop() call so the driver doesn't try to bang dead hardware... just in case it's broken and assumes work structs will run before ->stop(). > The other thing I don't get is why STR works fine but STD hangs, > from my reading of stuff in kernel/power they should be the same > with respect to order of task-freeze and suspend. Indeed, that is a little odd. But I think this patch is correct, and the question is why the incorrect code doesn't break in one case. Maybe not something to worry about too much? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part