I will try to get more info tomorrow.richardpl said:Can you also please give more details about ndis crash?
#ifconfig wlan0 create wlandev ndis0
ifconfig:
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 68:b5:99:67:a3:90
media: Ethernet autoselect (none)
status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether e0:2a:82:19:02:21
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether e0:2a:82:19:02:21
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 MHz 11b)
country US authmode OPEN privacy OFF txpower 0 bmiss 7 mcastrate 11
mgmtrate 11 scanvalid 60 bintval 0
#ifconfig wlan0 up scan
richardpl said:backtrace would be more useful. If cause of double fault is small stack, solution is very simple. But texdump is right answer because vmcore is not useful to me.
Also code from here:
http://gitorious.org/NDISulator/
https://github.com/richardpl/NDISulator/
Have improved debug support so feel free to try it.
# ifconfig wlan0 ssid test && ifconfig wlan0 up scan
#!/bin/sh
#ddb script "kdb.enter.panic=textdump set; capture on; show allpcpu; bt; ps; alltrace; show alllock; call doadump; reset"
sleep 5
kldload ndis
sysctl debug.ndis=-1
kldload /boot/modules/rt2860_sys.ko
ifconfig wlan0 create wlandev ndis0
sleep 0.1
ifconfig wlan0 ssid "ACORP-W422G"
sleep 0.1
ifconfig wlan0 up scan
sleep 1
It did not help.richardpl said:Could you try to make ndis_ticktask() function in if_ndis.c empty to see if this will make any improvement, recompile/reload if_ndis.ko module after this.
I will try.richardpl said:Also try to find other driver versions.
I have prepared new text dump with WITNESS and INVARIANTS options:richardpl said:If none of this works recompile kernel with WITNESS and INVARIANTS.
server# make clean
cd /usr/src/sys/modules/ndis && make clean
rm -f export_syms ndis.ko ndis.kld subr_pe.o subr_ndis.o subr_hal.o subr_ntoskrnl.o kern_ndis.o kern_windrv.o subr_usbd.o winx_wrap.o opt_usb.h
pci_if.h bus_if.h device_if.h vnode_if.h vnode_if_newproto.h vnode_if_typedef.h
cd /usr/src/sys/modules/if_ndis && make clean
rm -f export_syms if_ndis.ko if_ndis.kld if_ndis.o if_ndis_pci.o if_ndis_pccard.o if_ndis_usb.o opt_usb.h opt_ndis.h opt_wlan.h card_if.h
pci_if.h bus_if.h device_if.h
cd /usr/src/usr.sbin/ndiscvt && make clean
rm -f y.output ndiscvt ndiscvt.o subr_pe.o inf.o inf-token.o inf-parse.o ndiscvt.8.gz ndisgen.8.gz ndiscvt.8.cat.gz ndisgen.8.cat.gz inf-
token.c inf-parse.c y.tab.c y.tab.h
server# make build
cd /usr/src/sys/modules/ndis && make
Warning: Object directory not changed from original /usr/src/sys/modules/ndis
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h
:> opt_usb.h
cc -pipe -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow
-msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -
c /usr/src/sys/modules/ndis/../../compat/ndis/subr_pe.c
cc -pipe -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow
-msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -
c /usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function 'NdisAllocateMemory':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:391: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has
type 'uint64_t'
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function 'NdisMFreeSharedMemory':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:1253: warning: format '%llu' expects type 'long long unsigned int', but argument 7 has
type 'uint64_t'
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function 'NdisMMapIoSpace':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:1302: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has
type 'uint64_t'
cc -pipe -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow
-msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -
c /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: (Each undeclared identifier is reported only once
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: for each function it appears in.)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:108: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:115: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_BUFFER_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:122: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_BUFFER_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:130: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_BUFFER_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:138: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:146: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:153: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:160: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_BUFFER_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:167: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_BUFFER_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:175: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_BUFFER_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:183: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
*** Error code 1
Stop in /usr/src/sys/modules/ndis.
*** Error code 1
Stop in /usr/ndisulator.
Exit 1