2007-10-19 17:35:49

by Timur Tabi

[permalink] [raw]
Subject: request_firmware() and in-kernel modules

If my driver is compiled in-kernel (and I have module support turned
off), can I still use request_firmware()? If my driver is loaded before
the file system drivers are loaded, how can a user process copy the
firmware to the /sys/class/firwmare/.../data device?


2007-10-21 04:09:58

by Greg KH

[permalink] [raw]
Subject: Re: request_firmware() and in-kernel modules

On Fri, Oct 19, 2007 at 12:35:38PM -0500, Timur Tabi wrote:
> If my driver is compiled in-kernel (and I have module support turned off),
> can I still use request_firmware()?

Yes.

> If my driver is loaded before the file system drivers are loaded, how
> can a user process copy the firmware to the
> /sys/class/firwmare/.../data device?

I'd recommend using the non-blocking mode, that way, when userspace
finally gets running, it can handle the firmware events properly, and
your kernel code will have not timed out already.

thanks,

greg k-h

2007-10-22 22:01:57

by Timur Tabi

[permalink] [raw]
Subject: Re: request_firmware() and in-kernel modules

Greg KH wrote:

> I'd recommend using the non-blocking mode, that way, when userspace
> finally gets running, it can handle the firmware events properly, and
> your kernel code will have not timed out already.

Thanks Greg, that did the trick.

What the value of FW_ACTION_NOHOTPLUG? If I specify that instead of
FW_ACTION_HOTPLUG, I presume I don't get automatic loading of the firwmare via
the hotplug subsystem, but request_firmware() still times out. Why would I ever
not want to take advantage of hotplug?