Re: request_firmware vs. resume (was Re: [PATCH] bnx2 - use request_firmware())

Rafael J. Wysocki
2008-07-09T22:31:27Z

On Thursday, 10 of July 2008, Theodore Tso wrote:
> On Wed, Jul 09, 2008 at 11:58:31PM +0200, Rafael J. Wysocki wrote:
> > > Translation: so much for saving "non-swappable kernel memory".
> > > Unless, of course we add a pre-suspend hook. (Which doesn't exist
> > > yet, AFAICT from a quick perusal of Documentation/power/devices.txt.)
> >
> > No, it doesn't.
> >
> > You will be able to register a suspend notifier instead, but this requires
> > one fix which is in the works.
>
> Will a suspend notifier be able to block the suspend until userspace
> gets back to the device driver calling request_firmware()?

I think so.

To be exact, I'm going to put the disabling of usermode helpers after the
invocation of the suspend notifiers and that will wait for all of the already
running helpers to finish.

Thanks,
Rafael