From: Larry Finger <Larry.Finger@lwfinger.net>
To: Mourad De Clerck <bugs-wireless@aquazul.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: firmware loading fails for b43 using linux 3.4?
Date: Thu, 24 May 2012 08:25:12 -0500 [thread overview]
Message-ID: <4FBE36B8.8020208@lwfinger.net> (raw)
In-Reply-To: <4FBDBB48.8080004@aquazul.com>
On 05/23/2012 11:38 PM, Mourad De Clerck wrote:
>
> Well, I just tried it. It kinda works, but it seems a bit brittle.
>
> Just after recompiling and rebooting, by chance my system needed a fsck, which
> seemed to delay it enough for it to go beyond the loop count, and it failed to
> load the firmware.
>
> (Even without the fsck, my laptop could hang around indefinitely in early
> userspace waiting for me to type in my cryptoroot password)
>
> Anyway, the second time I rebooted, it was fast enough (without the fsck) to
> load the firmware.
>
> dmesg reported "********** loop count at exit 5" in that case.
I was afraid that it might be too fragile; however, after these tests, I have a
solution. Only the first firmware file (ucodeXX.fw) needs to be loaded
asynchronously. Once it is available, all the others can be loaded in a
synchronous manner. Realizing that greatly simplifies the logic.
It may be a while before I sort out all the details of this fix. Until then, you
can use either the temporary fix or compile b43 as a module. To increase the
robustness, change the end of the for loop from "i < 10" to "i < 5000". I could
never do that in final code as it would delay forever if the firmware were
really missing, but it will delay long enough to handle an fsck on root, your
entering of the password for the encrypted fs, or whatever slows the starting of
userland.
I will send you a test patch when the next round is available.
I always have the wireless drivers built as modules. When making changes, one
only needs to recompile, reinstall the new version, and unload/reload the
module. If built into the kernel, a reboot is needed for every change. None the
less, the code needs to handle all cases.
Larry
next prev parent reply other threads:[~2012-05-24 13:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-23 23:49 firmware loading fails for b43 using linux 3.4? Mourad De Clerck
2012-05-24 1:13 ` Larry Finger
2012-05-24 2:44 ` Mourad De Clerck
2012-05-24 3:03 ` Larry Finger
2012-05-24 4:38 ` Mourad De Clerck
2012-05-24 13:25 ` Larry Finger [this message]
2012-05-24 16:41 ` Mourad De Clerck
2012-05-24 16:43 ` Arend van Spriel
2012-05-24 19:36 ` Larry Finger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FBE36B8.8020208@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=bugs-wireless@aquazul.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).