Hi,
I have prepared a patch that makes request_firmware skip the usual
grace period that it gives firmware images to show up, if it determines
that userspace was not notified at all.
When request_firmware is called, it sends an event to userspace to
ask for the firmware image that is needed, and then it installs a
timeout so that it will not wait forever for the image. However,
if userspace did not receive the event at all (no /sbin/hotplug,
for instance), then having the kernel wait is pointless. This is
particularly true during boot, when the wait is done synchronously
and the whole kernel freezes for a minute.
The attached patch fixes this by making _request_firmware check whether
the firmware loading event was succesfully sent to userspace, and skip
the timeout if it has not. The patch comes in two parts:
1. The first part changes kobject_uevent_env in lib/kobject_uevent.c
to report a failure if both netlink_broadcast (if applicable) and
call_usermodehelper fail to send the event to userspace. Nothing in
the kernel seems to care about the return value of kobject_uevent_env,
so this should not break anything.
2. The second part changes _request_firmware in
drivers/base/firmware_class.c to actually check the return value of
kobject_uevent and skip the loading_timeout delay if the loading event
was not delivered to userspace at all.
The patches apply cleanly against 2.6.23-rc1. Any suggestions or feedback
will be welcome.
Javier
PS Please CC: me on replies, as I am not subscribed to the list.