Bug 5048

Summary: mdev does not send "don't have it" message for missing firmware
Product: Busybox Reporter: danthau
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: Possible solution

Description danthau 2012-04-06 22:13:57 UTC
With Linux 3.1 I had no issues.  With Linux 3.2 (and now 3.3) and mdev, I found a delay of one minute between "modprobe iwlwifi" and wlan0 showing up with "iwconfig" or "iw dev".  With udev, this delay completely disappears.

I inquired about it in #linux-networking on freenode, and was informed the following:

17:31:35         johill | between 3.1 and 3.2 we bumped the firmware api version to 6, but then we could never release api 6
17:31:45         johill | so we request iwlwifi-100-6.ucode first
17:31:52         johill | and when that fails, we request iwlwifi-100-5.ucode
...
17:32:21         johill | so the -6 request still goes out to mdev, which should return "don't have it" right away, but apparently doesn't
17:32:35         johill | udev apparently does return "don't have it"

In summary, mdev does not seem to send the "don't have it" message the Linux kernel exppects in response to requests for firmware it cannot find, which results an a minute-long delay whenever one tries to load the driver for such hardware.
Comment 1 Wouter van Kesteren 2012-04-08 00:13:04 UTC
Created attachment 4238 [details]
Possible solution

I recently got affected by this as well and made a patch a few days ago for it. Ive tested it and it seems to work fine, causing the delay of 120 seconds to go down to a mere .2 seconds on my system.
Comment 2 Denys Vlasenko 2012-05-19 21:41:37 UTC
Fixed in git:

commit 25cb5aae2b7b0014b6476e7db62e204a00242762
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sat May 19 23:39:45 2012 +0200

    mdev: tell kernel that we didn't find the firmware