Re: wpa_supplicant causes panic in ieee80211_newstate

From: Brian Candler <B.Candler_at_pobox.com>
Date: Tue, 10 May 2005 10:13:54 +0100
On Tue, May 10, 2005 at 03:25:32AM +0000, Bill Paul wrote:
> Uhm... hm. I don't know how to tell you this, but I can't reproduce your
> problem. I plugged my WG311v2 NIC into my dual Opteron system running
> 6.0-SNAP002 (current snapshot from march) and the latest code from
> /sys/compat/ndis and /sys/dev/if_ndis (as of today), and the NIC is
> detected and works fine:
...
> I used the Windows XP driver from the wg311v2_v2_0_0_7.zip distribution
> and gave ndisgen all three .BIN files. (Note: experimentation has shown
> that the driver really only opens one of the files. I think it picks
> the right image depending on which Texas Instruments chip it finds.)

For me, pciconf -lv reports:

ndis0_at_pci2:11:0:        class=0x028000 card=0x4c001385 chip=0x9066104c rev=0x00 hdr=0x00
    vendor   = 'Texas Instruments (TI)'
    device   = 'TNETW1130(ACX111) 802.11b/g Wireless Cardbus/PCI Adapter'
    class    = network

> opteron# pwd
> /u/wpaul/1.2B6/Driver/Windows XP
> opteron# ls -l
> total 2464
> -rw-rw-rw-  1 wpaul  wpaul   76568 Apr  4  2004 FW1130.BIN
> -rwxr-xr-x  1 wpaul  wpaul   78112 May  9 12:18 FW1130.BIN.ko
> -rw-r--r--  1 wpaul  wpaul   76953 May  9 12:18 FW1130.BIN.o
> -rw-rw-rw-  1 wpaul  wpaul   83320 Apr  4  2004 FwRad16.bin
> -rwxr-xr-x  1 wpaul  wpaul   84870 May  9 12:18 FwRad16.bin.ko
> -rw-r--r--  1 wpaul  wpaul   83707 May  9 12:18 FwRad16.bin.o
> -rw-rw-rw-  1 wpaul  wpaul   84912 Apr  4  2004 FwRad17.bin
> -rwxr-xr-x  1 wpaul  wpaul   86462 May  9 12:18 FwRad17.bin.ko
> -rw-r--r--  1 wpaul  wpaul   85299 May  9 12:18 FwRad17.bin.o
> -rw-rw-rw-  1 wpaul  wpaul    9135 Oct  4  2004 netwg311.cat
> -rw-rw-rw-  1 wpaul  wpaul  386688 Jun 17  2004 netwg311_XP.sys
> -rwxr-xr-x  1 wpaul  wpaul  644894 May  9 12:18 netwg311_XP_sys.ko
> -rw-r--r--  1 wpaul  wpaul  642337 May  9 12:18 netwg311_XP_sys.o
> -rw-rw-rw-  1 wpaul  wpaul    9157 Sep  1  2004 wg311v2.inf

Same here:

bash-3.00# pwd
/root/ndis/1.2B6/Driver/Windows XP
bash-3.00# ls -l
total 2464
-rw-rw-rw-  1 root  wheel   76568 Apr  4  2004 FW1130.BIN
-rwxr-xr-x  1 root  wheel   78112 May  9 17:48 FW1130.BIN.ko
-rw-r--r--  1 root  wheel   76953 May  9 17:48 FW1130.BIN.o
-rw-rw-rw-  1 root  wheel   83320 Apr  4  2004 FwRad16.bin
-rwxr-xr-x  1 root  wheel   84870 May  9 17:48 FwRad16.bin.ko
-rw-r--r--  1 root  wheel   83707 May  9 17:48 FwRad16.bin.o
-rw-rw-rw-  1 root  wheel   84912 Apr  4  2004 FwRad17.bin
-rwxr-xr-x  1 root  wheel   86462 May  9 17:48 FwRad17.bin.ko
-rw-r--r--  1 root  wheel   85299 May  9 17:48 FwRad17.bin.o
-rw-rw-rw-  1 root  wheel    9135 Oct  4  2004 netwg311.cat
-rw-rw-rw-  1 root  wheel  386688 Jun 17  2004 netwg311_XP.sys
-rwxr-xr-x  1 root  wheel  644894 May  9 17:48 netwg311_XP_sys.ko
-rw-r--r--  1 root  wheel  642337 May  9 17:48 netwg311_XP_sys.o
-rw-rw-rw-  1 root  wheel    9157 Sep  1  2004 wg311v2.inf

> I'm not sure what to tell you at this point. It's possible there's
> something broken in -current that's hosing Project Evil. I won't be
> sure until I can get a -current snapshot running at home. You might
> want to try some simple diagnostics, like moving the NIC to another
> PCI slot.

OK. IRQ11 looks like it's shared, don't know if that makes any difference:

$ dmesg | grep -i "irq.*11"
pci_link0: <ACPI PCI Link LNKA> irq 11 on acpi0
pci_link3: <ACPI PCI Link LNKD> irq 11 on acpi0
uhci0: <Intel 82371AB/EB (PIIX4) USB controller> port 0xcce0-0xccff irq 11 at device 7.2 on pci0
ifpi0: <AVM Fritz!Card PCI> port 0xdce0-0xdcff mem 0xfafffc00-0xfafffc1f irq 11 at device 9.0 on pci2
xl0: <3Com 3c905B-TX Fast Etherlink XL> port 0xcc00-0xcc7f mem 0xff201000-0xff20107f irq 11 at device 17.0 on pci0
$ 

(xl0 is the main "uplink" interface for this system, so there's quite a bit
of traffic on it)

Now, as you suggested I moved the card to a different PCI slot, at the same
time taking out the ISDN card which was also in there, and hey presto I get
a whole load of stuff logged!

ndis0: <NETGEAR WG311v2 802.11g Wireless PCI Adapter> mem 0xfaffe000-0xfaffffff,0xfafc0000-0xfafdffff irq 11 at device 9.0 on pci2
ndis0: [GIANT-LOCKED]
ndis0: NDIS API version: 5.1
ndis0: Ethernet address: 00:0f:b5:45:fb:ae
Sleeping on "ndissp" with the following non-sleepable locks held:
exclusive sleep mutex ndis softc lock (network driver) r = 0 (0xc1a72db4) locked _at_ /export/src/5.3-RELEASE/usr/src/sys/compat/ndis/kern_ndis.c:1098
KDB: stack backtrace:
kdb_backtrace(1,1,1,c1a8f600,c17c0000) at kdb_backtrace+0x29
witness_warn(5,c0a26e40,c08c0506,c08de706) at witness_warn+0x19a
msleep(c1a8f738,c0a26e40,0,c08de706,0) at msleep+0x42
ndis_thsuspend(c1a8f600,c0a26e40,0) at ndis_thsuspend+0x34
KeWaitForSingleObject(c154425c,0,0,1,0,c154424c,0,0) at KeWaitForSingleObject+0x1f9
KeFlushQueuedDpcs(c1794000,fe,480,c1a72000,d1577b48) at KeFlushQueuedDpcs+0x41
ndis_halt_nic(c1a72000) at ndis_halt_nic+0xa2
ndis_attach(c1630c00) at ndis_attach+0xbce
ndis_attach_pci(c1630c00) at ndis_attach_pci+0x524
device_attach(c1630c00,c1630c00,c1630c00,0,c1614500) at device_attach+0x58
device_probe_and_attach(c1630c00,c1630c00,c1614500) at device_probe_and_attach+0xe0
pci_driver_added(c1630c80,c1ac422c) at pci_driver_added+0xd1
devclass_add_driver(c1515640,c1ac422c,c18641c0,c1ac4258,c19070a0) at devclass_add_driver+0xb7
driver_module_handler(c18641c0,0,c1ac4244,c09c94e0,c08bef29) at driver_module_handler+0x59
module_register_init(c1ac4258) at module_register_init+0x52
linker_file_sysinit(c1aafb00,c1aafb00,c1aafb00,1,c1aafb00) at linker_file_sysinit+0x7d
linker_load_file(c19070a0,d1577ca0,400,0,c1792400) at linker_load_file+0xd9
linker_load_module(c1792400,0,0,0,d1577ccc) at linker_load_module+0xb7
kldload(c17c0000,d1577d04,1,1,292) at kldload+0xcb
syscall(3b,3b,3b,0,bfbfecf0) at syscall+0x227
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (304, FreeBSD ELF32, kldload), eip = 0x280b63eb, esp = 0xbfbfec5c, ebp = 0xbfbfeca4 ---
lock order reversal
 1st 0xc1a72db4 ndis softc lock (network driver) _at_ /export/src/5.3-RELEASE/usr/src/sys/compat/ndis/kern_ndis.c:1098
 2nd 0xc09ca7c0 Giant (Giant) _at_ /export/src/5.3-RELEASE/usr/src/sys/kern/kern_synch.c:236
KDB: stack backtrace:
kdb_backtrace(0,ffffffff,c09da5f0,c09dbba8,c0930408) at kdb_backtrace+0x29
witness_checkorder(c09ca7c0,9,c08c053f,ec) at witness_checkorder+0x55c
_mtx_lock_flags(c09ca7c0,0,c08c053f,ec) at _mtx_lock_flags+0x5b
msleep(c1a8f738,c0a26e40,0,c08de706,0) at msleep+0x386
ndis_thsuspend(c1a8f600,c0a26e40,0) at ndis_thsuspend+0x34
KeWaitForSingleObject(c154425c,0,0,1,0,c154424c,0,0) at KeWaitForSingleObject+0x1f9
KeFlushQueuedDpcs(c1794000,fe,480,c1a72000,d1577b48) at KeFlushQueuedDpcs+0x41
ndis_halt_nic(c1a72000) at ndis_halt_nic+0xa2
ndis_attach(c1630c00) at ndis_attach+0xbce
ndis_attach_pci(c1630c00) at ndis_attach_pci+0x524
device_attach(c1630c00,c1630c00,c1630c00,0,c1614500) at device_attach+0x58
device_probe_and_attach(c1630c00,c1630c00,c1614500) at device_probe_and_attach+0xe0
pci_driver_added(c1630c80,c1ac422c) at pci_driver_added+0xd1
devclass_add_driver(c1515640,c1ac422c,c18641c0,c1ac4258,c19070a0) at devclass_add_driver+0xb7
driver_module_handler(c18641c0,0,c1ac4244,c09c94e0,c08bef29) at driver_module_handler+0x59
module_register_init(c1ac4258) at module_register_init+0x52
linker_file_sysinit(c1aafb00,c1aafb00,c1aafb00,1,c1aafb00) at linker_file_sysinit+0x7d
linker_load_file(c19070a0,d1577ca0,400,0,c1792400) at linker_load_file+0xd9
linker_load_module(c1792400,0,0,0,d1577ccc) at linker_load_module+0xb7
kldload(c17c0000,d1577d04,1,1,292) at kldload+0xcb
syscall(3b,3b,3b,0,bfbfecf0) at syscall+0x227
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (304, FreeBSD ELF32, kldload), eip = 0x280b63eb, esp = 0xbfbfec5c, ebp = 0xbfbfeca4 ---

I thought it wasn't actually working:

$ ifconfig ndis0
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        ether 00:0f:b5:45:fb:ae
        media: IEEE 802.11 Wireless Ethernet autoselect
        status: no carrier
        ssid ""
        authmode OPEN privacy OFF txpowmax 100
$ ifconfig ndis0 scan
$

until I did 'ifconfig ndis0 up', and at that point I can see wireless
networks (although 'ifconfig ndis0' still logs 'ndis0: failed to get bssid'
each time)

On my first attempt strangely I was also getting a whole bunch of fxp0
command queue timeout, SCB timeout, device timeout and DMA timeout errors
(even though I didn't touch anything to do with fxp0). Next tried moving the
Netgear to a different PCI slot again, and putting the ISDN card back where
it was. I get the same ndis0 behaviour as above (non-sleepable lock, lock
order reversal), but no fxp0 errors.

Oh well, this gives me something more to play with... I didn't realise PCI
was so weird, thanks for the suggestion :-)

Afraid I can't help you with 6-snapshot servers; I did a 5.3-RELEASE install
then a cvsup / makeworld. Takes a good 5 hours on this old system :-(

Regards,

Brian.
Received on Tue May 10 2005 - 07:14:02 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:34 UTC