]> git.itanic.dy.fi Git - linux-stable/commit
b43: Fix firmware loading when driver is built into the kernel
authorLarry Finger <Larry.Finger@lwfinger.net>
Thu, 20 Dec 2012 21:55:01 +0000 (15:55 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jan 2013 16:46:37 +0000 (08:46 -0800)
commit0039b1cfcd30a3f001ea2dfd2eaef40a249c999b
tree746a7ef2ef67b5b2387112ec66ca24685407580c
parent8a3e96a47ce6da5c7eb9209822d947eefd16e46e
b43: Fix firmware loading when driver is built into the kernel

commit 5e20a4b53094651d80f856ff55a916b999dbb57a upstream.

Recent versions of udev cause synchronous firmware loading from the
probe routine to fail because the request to user space would time
out. The original fix for b43 (commit 6b6fa58) moved the firmware
load from the probe routine to a work queue, but it still used synchronous
firmware loading. This method is OK when b43 is built as a module;
however, it fails when the driver is compiled into the kernel.

This version changes the code to load the initial firmware file
using request_firmware_nowait(). A completion event is used to
hold the work queue until that file is available. This driver
reads several firmware files - the remainder can be read synchronously.
On some test systems, the async read fails; however, a following synch
read works, thus the async failure falls through to the sync try.

Reported-and-Tested by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/b43/b43.h
drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.h