On Tue, 2004-11-02 at 12:30 +0100, Pavel Machek wrote: > HI! > > > The main problem here is: request_firmware(). Drivers tend to use that > > synchronous interface to request a firmware from userland. In our case, > > that mean they would deadlock (or timeout) and fail... > > > > There is an asynchronous version of request_firmware() that perfectly > > fits, however, it makes things slightly more complicated for drivers > > wanting to use it, so I suspect unless told to do so using brute force, > > drivers maintainers won't go that way. Which basically means deprecating > > request_firmware() in favor of request_firmware_nowait(). > > Actually, request_firmware_nowait does not help. Userland would see > non-functional hardware after resume but before > request_firmware_nowait() is done. That would hurt for example with > nfsroot and firmware over nfs, or just general confusion "why is this > f***ing network card broken". Hrm... suspending with NFS root seems to be quite an acrobatic exercice anyway, but I see your point. Still, a synchronous request_firmware is broken anyway, while the nowait version may work. > Solution seems to be "do request_firmware before suspend begins, and > cache it in memory". Which requires knowing when it is safe to rely on userland, which means having ways to be notified before the whole suspend/resume process starts as we already discussed. I'm still wondering if that could be done via separate PM_* messages (PM_PRE_SUSPEND, PM_POST_RESUME) or via a simple notifier... Ben.