Problem (maybe a solution) loading iwi firmware: firmware_get: failed to load firmware image iwi_bss

Sam Leffler sam at errno.com
Sat Jul 29 15:34:20 UTC 2006


Erik Nørgaard wrote:
> Sam Leffler wrote:
>> Erik Nørgaard wrote:
>> If you do:
>>
>> kldload if_iwi
>> kldload iwi_bss
>>
>> and then run kldstat do you see the iwi_bss.ko loaded?
> 
> Yes
> 
>> The above complaint means that iwi hit some problem loading the iwi_bss
>> image.  Typically this is because the file cannot be located on the
>> filesystem but if you can manually load it then that should make it
>> available regardless of where you have it sitting in the filesystem.
>> Past that you need the debug knob to find out why iwi's request is
>> failing.  It appears noone's yet added such a knob to the firmware(9)
>> code so one can only guess.
> 
> That's what led me into try to figure out where it gets the firmware
> from in my first mail.
> 
>>> iwi_newstate: INIT -> INIT flags 0x0
>>> iwi0: timeout waiting for iwi_bss firmware initialization to complete
>>> iwi0: could not load boot firmware iwi_bss
>>> iwi_newstate: INIT -> INIT flags 0x0
>> Ok, this looks more useful.  It seems your card simply didn't start up
>> fast enough (hopefully).  Try editing the driver to increase the time it
>> waits for the firmware to startup.  Looks like it's line 2516 of
>> if_iwi.c; change "hz" to something like 10*hz (10 seconds) and see if
>> that helps.  I've heard some complaints of problems like this.
> 
> Ok, thanks, I tried. Actually I tried setting it to both 10 and 100 just
> in case. But no luck.
> 
> Replay of the attempt below, it seems that it makes no difference if
> if_iwi or iwi_bss is loaded first. Also, setting debug.iwi=1 seems
> only to add the iwi_newstate lines. I tried to set it to 2 to see if
> that would produce more output but no. (the complete dmesg after boot is
> at the end of the mail).
> 
> photon# kldload if_iwi
> photon# kldload iwi_bss
> 
> iwi0: <Intel(R) PRO/Wireless 2200BG> mem 0xb0107000-0xb0107fff irq 10 at
> device 10.0 on pci6
> iwi0: Ethernet address: 00:16:6f:93:c9:75
> 
> photon# kldstat
> 
> Id Refs Address    Size     Name
>  6    1 0xc4e03000 d000     if_iwi.ko
>  7    1 0xc4e11000 30000    iwi_bss.ko
> 
> photon# ifconfig iwi0 10.35.4.64/24 ssid MYAP
> photon# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	inet 10.35.4.64 netmask 0xffffff00 broadcast 10.35.4.255
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid MYAP channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# dmesg
> 
> Interrupt storm detected on "irq5:"; throttling interrupt source
> iwi0: timeout waiting for iwi_bss firmware initialization to complete
> iwi0: could not load boot firmware iwi_bss
> 
> photon# kldunload iwi_bss
> photon# kldload iwi_bss
> photon# ifconfig iwi0 10.35.4.64/24 ssid MYAP channel 6
> photon# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	inet 10.35.4.64 netmask 0xffffff00 broadcast 10.35.4.255
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid MYAP channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# dmesg
> 
> iwi0: timeout waiting for iwi_bss firmware initialization to complete
> iwi0: could not load boot firmware iwi_bss
> 
> photon# kldstat
> Id Refs Address    Size     Name
>  6    1 0xc4e03000 d000     if_iwi.ko
>  7    1 0xc4e11000 30000    iwi_bss.ko
> photon# sysctl debug.iwi=1
> debug.iwi: 0 -> 1
> photon# ifconfig iwi0 10.35.4.64/24 ssid MYAP channel 6
> photon# dmesg
> 
> iwi_newstate: INIT -> INIT flags 0x0
> firmware_get: failed to load firmware image iwi_bss
> iwi0: could not load firmware
> iwi_newstate: INIT -> INIT flags 0x0
> 
> photon# ifconfig iwi0 down
> photon# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	inet 10.35.4.64 netmask 0xffffff00 broadcast 10.35.4.255
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid MYAP channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# ifconfig iwi0 up
> photon# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	inet 10.35.4.64 netmask 0xffffff00 broadcast 10.35.4.255
> 	inet6 fe80::216:6fff:fe93:c975%iwi0 prefixlen 64 scopeid 0x4
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid MYAP channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# ifconfig iwi0 10.35.4.64/24 ssid MYAP channel 6
> photon# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	inet6 fe80::216:6fff:fe93:c975%iwi0 prefixlen 64 scopeid 0x4
> 	inet 10.35.4.64 netmask 0xffffff00 broadcast 10.35.4.255
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid MYAP channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# dmesg
> 
> iwi_newstate: INIT -> INIT flags 0x0
> firmware_get: failed to load firmware image iwi_bss
> iwi0: could not load firmware
> iwi_newstate: INIT -> INIT flags 0x0
> iwi_newstate: INIT -> INIT flags 0x0
> firmware_get: failed to load firmware image iwi_bss
> iwi0: could not load firmware
> iwi_newstate: INIT -> INIT flags 0x0
> 
> photon# kldunload if_iwi
> photon# dmesg
> 
> iwi0: detached
> 
> photon# kldstat
> 
> Id Refs Address    Size     Name
>  7    1 0xc4e11000 30000    iwi_bss.ko
> 
> photon# kldunload iwi_bss
> 
> photon# kldstat
> Id Refs Address    Size     Name
> 
> photon# kldload iwi_bss
> photon# kldload if_iwi
> photon# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid "" channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# kldstat
> 
> Id Refs Address    Size     Name
>  7    1 0xc4e11000 30000    iwi_bss.ko
>  8    1 0xc4e03000 d000     if_iwi.ko
> 
> photon# dmesg
> 
> iwi0: <Intel(R) PRO/Wireless 2200BG> mem 0xb0107000-0xb0107fff irq 10 at
> device 10.0 on pci6
> iwi0: Ethernet address: 00:16:6f:93:c9:75
> 
> photon# ifconfig iwi0 10.35.4.64/24 ssid MYAP channel 6
> dphoton# ifconfig
> 
> iwi0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
> 	inet 10.35.4.64 netmask 0xffffff00 broadcast 10.35.4.255
> 	ether 00:16:6f:93:c9:75
> 	media: IEEE 802.11 Wireless Ethernet autoselect
> 	status: no carrier
> 	ssid MYAP channel 1
> 	authmode OPEN privacy OFF txpowmax 100 protmode CTS
> 
> photon# dmesg
> 
> iwi0: <Intel(R) PRO/Wireless 2200BG> mem 0xb0107000-0xb0107fff irq 10 at
> device 10.0 on pci6
> iwi0: Ethernet address: 00:16:6f:93:c9:75
> iwi0: timeout waiting for iwi_bss firmware initialization to complete
> iwi0: could not load boot firmware iwi_bss
> 
> ... gave up. The above was with a custom kernel where I removed
> everything that did not seem necessary, keeping "device firmware" and
> "device wlan". I have just tried also with a GENERIC kernel and there is
> no difference at all.
> 
> Trying to load/unload too many times can cause the system to crash hard
> - no nice page fault or kernel trap or anything, just a hard reboot. In
> /var/log/messages I found this:
> 
> loaded if_iwi & iwi_bss for the n'th time, in this run, the if_iwi was
> modified to wait 100 sec:
> 
> Jul 28 22:42:41 photon kernel: iwi0: <Intel(R) PRO/Wireless 2200BG> mem
> 0xb01070
> 00-0xb0107fff irq 10 at device 10.0 on pci6
> Jul 28 22:42:41 photon kernel: iwi0: Ethernet address: 00:16:6f:93:c9:75
> 
> ifconfig
> 
> Jul 28 22:43:06 photon kernel: iwi_newstate: INIT -> INIT flags 0x0
> Jul 28 22:43:52 photon kernel: Setting MAC address to 00:16:6f:93:c9:75
> Jul 28 22:43:52 photon kernel: Configuring adapter
> Jul 28 22:43:52 photon kernel: Setting power mode to 0
> Jul 28 22:43:52 photon kernel: Setting RTS threshold to 2346
> Jul 28 22:43:52 photon kernel: Setting fragmentation threshold to 2346
> Jul 28 22:43:52 photon kernel: Setting .11bg supported rates (12)
> Jul 28 22:43:52 photon kernel: Setting .11a supported rates (0)
> Jul 28 22:43:52 photon kernel: Setting desired ESSID to "ChuecaWireless"
> Jul 28 22:43:52 photon kernel: Setting initialization vector to 1368112666
> Jul 28 22:43:52 photon kernel: Setting wep key index 0 len 0
> Jul 28 22:43:52 photon kernel: Setting wep key index 1 len 0
> Jul 28 22:43:52 photon kernel: Setting wep key index 2 len 0
> Jul 28 22:43:52 photon kernel: Setting wep key index 3 len 0
> Jul 28 22:43:52 photon kernel: Enabling adapter
> Jul 28 22:43:52 photon kernel: iwi_newstate: INIT -> SCAN flags 0x5
> Jul 28 22:43:52 photon kernel: iwi_newstate: SCAN -> SCAN flags 0x3
> Jul 28 22:43:52 photon kernel: Start scanning
> Jul 28 22:43:58 photon kernel: iwi0: scan stuck
> Jul 28 22:43:58 photon kernel: iwi_newstate: SCAN -> INIT flags 0x0
> 
> reload if_iwi
> 
> Jul 28 22:45:17 photon kernel: iwi_newstate: INIT -> INIT flags 0x4
> Jul 28 22:45:17 photon kernel: iwi0: detached
> Jul 28 22:45:32 photon kernel: iwi0: <Intel(R) PRO/Wireless 2200BG> mem
> 0xb01070
> 00-0xb0107fff irq 10 at device 10.0 on pci6
> Jul 28 22:45:32 photon kernel: iwi0: Ethernet address: 00:16:6f:93:c9:75
> 
> crash. So, something is happening, the if_iwi seems to do what it can. I
> keep thinking that a conflict in the devices irq or other parameters may
> cause it to fail, the irq storm when the interface is first brought up
> seems to indicate such conflict.
> 
> Any ideas how to test this? Are there any things that I can do to shed
> more light on the hardware/device config?
> 
> Thanks, Erik
> 
> Full dmesg after boot:
> 
> Copyright (c) 1992-2006 The FreeBSD Project.
> Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> 	The Regents of the University of California. All rights reserved.
> FreeBSD 6.1-STABLE #1: Fri Jul 28 22:58:11 CEST 2006
>     norgaard at photon.:/usr/obj/usr/src/sys/VAIO
> Timecounter "i8254" frequency 1193182 Hz quality 0
> CPU: Intel(R) Pentium(R) M processor 1.73GHz (1729.02-MHz 686-class CPU)
>   Origin = "GenuineIntel"  Id = 0x6d8  Stepping = 8
> 
> Features=0xafe9fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE>
>   Features2=0x180<EST,TM2>
>   AMD Features=0x100000<NX>
> real memory  = 1063845888 (1014 MB)
> avail memory = 1036279808 (988 MB)
> kbd1 at kbdmux0
> cpu0 on motherboard
> pcib0: <Host to PCI bridge> pcibus 0 on motherboard
> pci0: <PCI bus> on pcib0
> agp0: <Intel 82915GM (915GM GMCH) SVGA controller> port 0x1800-0x1807
> mem 0xb0080000-0xb00fffff,0xc0000000-0xcfffffff,0xb0040000-0xb007ffff
> irq 10 at device 2.0 on pci0
> agp0: detected 7932k stolen memory
> agp0: aperture size is 256M
> drmsub0: <Intel i915GM>: (child of agp_i810.c) on agp0
> info: [drm] AGP at 0xb0080000 0MB
> info: [drm] Initialized i915 1.4.0 20060119
> pci0: <display> at device 2.1 (no driver attached)
> pci0: <multimedia> at device 27.0 (no driver attached)
> uhci0: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-A> port
> 0x1820-0x183f irq 5 at device 29.0 on pci0
> uhci0: [GIANT-LOCKED]
> usb0: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-A> on uhci0
> usb0: USB revision 1.0
> uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub0: 2 ports with 2 removable, self powered
> uhci1: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-B> port
> 0x1840-0x185f irq 10 at device 29.1 on pci0
> uhci1: [GIANT-LOCKED]
> usb1: <Intel 82801FB/FR/FW/FRW (ICH6) USB controller USB-B> on uhci1
> usb1: USB revision 1.0
> uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
> uhub1: 2 ports with 2 removable, self powered
> pci0: <serial bus, USB> at device 29.7 (no driver attached)
> pcib1: <PCI-PCI bridge> at device 30.0 on pci0
> pci6: <PCI bus> on pcib1
> rl0: <RealTek 8139 10/100BaseTX> port 0x2000-0x20ff mem
> 0xb0104000-0xb01040ff irq 10 at device 8.0 on pci6
> miibus0: <MII bus> on rl0
> rlphy0: <RealTek internal media interface> on miibus0
> rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> rl0: Ethernet address: 00:13:a9:44:44:a8
> cbb0: <PCI-CardBus Bridge> mem 0xb0105000-0xb0105fff irq 10 at device
> 9.0 on pci6
> cardbus0: <CardBus bus> on cbb0
> pccard0: <16-bit PCCard bus> on cbb0
> pci6: <serial bus, FireWire> at device 9.2 (no driver attached)
> pci6: <mass storage> at device 9.3 (no driver attached)
> pci6: <network> at device 10.0 (no driver attached)
> isab0: <PCI-ISA bridge> at device 31.0 on pci0
> isa0: <ISA bus> on isab0
> atapci0: <Intel ICH6 SATA150 controller> port
> 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1870-0x187f at device 31.2 on pci0
> atapci0: failed to enable memory mapping!
> ata0: <ATA channel 0> on atapci0
> ata1: <ATA channel 1> on atapci0
> ichsmb0: <SMBus controller> port 0x18a0-0x18bf irq 10 at device 31.3 on pci0
> ichsmb0: [GIANT-LOCKED]
> smbus0: <System Management Bus> on ichsmb0
> smb0: <SMBus generic I/O> on smbus0
> orm0: <ISA Option ROMs> at iomem
> 0xc0000-0xcffff,0xd0000-0xd0fff,0xdb800-0xdbfff,0xdc000-0xdffff on isa0
> atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
> atkbd0: <AT Keyboard> irq 1 on atkbdc0
> kbd0 at atkbd0
> atkbd0: [GIANT-LOCKED]
> psm0: <PS/2 Mouse> irq 12 on atkbdc0
> psm0: [GIANT-LOCKED]
> psm0: model GlidePoint, device ID 0
> sc0: <System console> at flags 0x100 on isa0
> sc0: VGA <16 virtual consoles, flags=0x300>
> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
> unknown: <PNP0303> can't assign resources (port)
> speaker0: <PC speaker> at port 0x61 on isa0
> unknown: <PNP0c02> can't assign resources (memory)
> unknown: <INT0800> can't assign resources (memory)
> unknown: <PNP0c02> can't assign resources (memory)
> unknown: <PNP0f13> can't assign resources (irq)
> Timecounter "TSC" frequency 1729015465 Hz quality 800
> Timecounters tick every 1.000 msec
> ad0: 95396MB <TOSHIBA MK1032GSX AS021G> at ata0-master SATA150
> acd0: DVDR <MATSHITADVD-RAM UJ-850S/1.00> at ata1-master UDMA33
> Trying to mount root from ufs:/dev/ad0s1a

It sounds like an irq routing problem.  The device is assigned irq 10
but it appears interrupts are coming in on irq5.  This would explain why
you don't get notified the firmware bringup completed.  I can't help w/
the interrupt problem.

	Sam


More information about the freebsd-mobile mailing list