Date: Wed, 28 Apr 2004 20:07:58 +0300 From: Niki Denev <nike_d@cytexbg.com> To: current@freebsd.org, wpaul@freebsd.org Subject: Re: ndis0 panics -current Message-ID: <cone.1083172078.235978.596.1001@phobos.totalterror.net> References: <cone.1083170047.850346.623.1001@phobos.totalterror.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a MIME GnuPG-signed message. If you see this text, it means that your E-mail or Usenet software does not support MIME signed messages. --=_mimegpg-phobos.totalterror.net-596-1083172078-0001 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit Niki Denev writes: > > Hello, > > Here is what i get with today cvsupped and rebuilt -CURRENT on IBM TP X31, > Kernel is GENERIC, dmesg, loader.conf, and the WinXP Centrino drivers > can be found at : http://www.totalterror.net/freebsd/ > Basically all i do is to load the if_ndis module (ndis.ko preloaded in > loader.conf) , set the ssid and wepkey and bring the interface up, and it > seems that just before the "ndis0: link up" console message, the machine > panics. > > ----------------------------------------------------------------- > [root@phobos /usr/src/sys/modules/if_ndis]# make clean && make > ... > [root@phobos /usr/src/sys/modules/if_ndis]# make load > /sbin/kldload -v /usr/src/sys/modules/if_ndis/if_ndis.ko > pci0: driver added > pci0:29:7: reprobing on driver added > pci0:31:3: reprobing on driver added > pci0:31:6: reprobing on driver added > pci1: driver added > pci2: driver added > pci2:2:0: reprobing on driver added > ndis0: <Intel(R) PRO/Wireless LAN 2100 3B Mini PCI Adapter> mem 0xc0200000-0xc02 > 00fff irq 11 at device 2.0 on pci2 > ndis0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0xc0200000 > ndis0: [GIANT-LOCKED] > can't re-use a leaf (ESS_ID)! > ndis0: NDIS API version: 5.1 > ndis0: Ethernet address: 00:04:23:92:33:23 > ndis0: 11b rates: 11Mbps 2Mbps 1Mbps > Loaded /usr/src/sys/modules/if_ndis/if_ndis.ko, id=9 > [root@phobos] /usr/src/sys/modules/if_ndis]# ifconfig ndis0 ssid my_ssid wepmode on wepkey 0x************************** up > ndis0: set filter failed: 6 > ndis0: set filter failed: 6 > ndis0: set filter failed: 6 > [root@phobos] /usr/src/sys/modules/if_ndis]#panic: lock (sleep mutex) Giant not locked @ /usr/src/sys/dev/if_ndis/if_ndis.c:1035 > at line 1038 in file /usr/src/sys/kern/subr_witness.c > cpuid = 0; > Debugger("panic") > Stopped at Debugger+0x46: xchgl %ebx,in_Debugger.0 > db> trace > Debugger(c07c28d5) at Debugger+0x46 > __panic(c07c5ee6,40e,c07c6487,c07da514,c07c1f57) at __panic+0x13d > witness_unlock(c0880980,0,c4a32f5f,40b) at witness_unlock+0xc6 > _mtx_unlock_flags(c0880980,0,c4a32f5f,40b,0) at _mtx_unlock_flags+0x67 > ndis_ticktask(c4cf4000,c43991b8,c09cd054,0,d7e3ed34) at ndis_ticktask+0x1e > ndis_runq(c09d1d1c,d7e3ed48,c09d1d1c,c09cd054,0) at ndis_runq+0x79 > fork_exit(c09cd054,c09d1d1c,d7e3ed48) at fork_exit+0xa8 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0x1, eip = 0, esp = 0xd7e3ed7c, ebp = 0 --- > db> > ---------------------------------------------------------------- > p.s. the trace is written by hand > because i don't have com port. > I took a peek at if_ndis.c,(around line 1035) and without pretending to know anything about, kernel and device drivers, it seemed a little odd to me, why the order of locking is mtx_unlock(&Giant), NDIS_LOCK, NDIS_UNLOCK, mtx_lock(&Giant). So, i've switched the Giant locks places and my wireless is working again, but i'm not sure that fix is correct? anyway, here are the changes that i've made: --- sys/dev/if_ndis/if_ndis.c Wed Apr 28 19:48:32 2004 +++ sys/dev/if_ndis/if_ndis.c.orig Wed Apr 28 19:48:10 2004 @@ -1032,7 +1032,7 @@ ndis_media_state linkstate; int error, len; - mtx_unlock(&Giant); + mtx_lock(&Giant); sc = xsc; @@ -1068,7 +1068,7 @@ NDIS_UNLOCK(sc); - mtx_lock(&Giant); + mtx_unlock(&Giant); return; } --=_mimegpg-phobos.totalterror.net-596-1083172078-0001 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAj+TuHNAJ/fLbfrkRAvwwAJ4wEwxUyZ/bxsWXdpn0O7nJQgyb1ACeJcyR Fiu+eCs35Kme8FmjiOAk/Cs= =E5lJ -----END PGP SIGNATURE----- --=_mimegpg-phobos.totalterror.net-596-1083172078-0001--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cone.1083172078.235978.596.1001>