From owner-freebsd-current@FreeBSD.ORG Wed Nov 4 09:51:10 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2195C106566B for ; Wed, 4 Nov 2009 09:51:10 +0000 (UTC) (envelope-from moonlightakkiy@yahoo.ca) Received: from web51806.mail.re2.yahoo.com (web51806.mail.re2.yahoo.com [206.190.38.237]) by mx1.freebsd.org (Postfix) with SMTP id BE2148FC1C for ; Wed, 4 Nov 2009 09:51:09 +0000 (UTC) Received: (qmail 93965 invoked by uid 60001); 4 Nov 2009 09:51:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.ca; s=s1024; t=1257328268; bh=p6pkiNQEOdDyLsCeO9xaDtHVHOmJBO2+QdusAUMdo+M=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=ErtrsUYevPrO9agu7nyAjFXjotiXh0UGm3TTlbSwvs3+60fJ4SbIzhi2R1JVu9+Z6T6F4VsIlTzNf0quN9N/B4s1nci+JrPpWq/eqnfS19Hn8TTNv/S1Uj84mYzhg0dMajLeYU53+qKEGEPi7b3rxNa1qc85V7/rNAvapSCTTTU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=QdKCkWqI0qDdk5cujzauOieao+yFdVrgkXfh2hRVwMBG15Oj1wpL4xAgcYDGthX0sBHnTfzkyV2GWgUiE3yqlhaoaA4VR/cDiHlCtTE60qqENZxPBXfGW59kGcturKUWWEn4l5DPwdrk39GHzZeS3RnfFMYb/K6mzBKkaR5f1Eg=; Message-ID: <950696.93705.qm@web51806.mail.re2.yahoo.com> X-YMail-OSG: re3M7gUVM1nPB5m3MNe9ag8MP3ExcF0Oyr2g6DddMzinrNXGscQL_zR52_h5p29opu5ITvOo4JKtqi2poBXXaOEygXwYzABbrXuHo1jhOsLWxoZlu4O953nkC0T1NT0MRXyEJMGrm8DKEq3ZUi31Ht0rnBwr8iu4j_4G_rCkszx9dwzD2zTXRDmXMbcCi9WiZApxu0oDzIRKeaTe7O7wFkYt9Lvbx89xNdoAQXkNEx4znxKIiK82vynImnfbbRLATkXqusdiRH3sLn8CuxqqlbSRlmWpGQrDH1g3q9nY17mr5IOZPChgDauZP6TxCVJriQMeo52845v5PJs8FbHtIEu08IeJ.n3508U7VhTG48GpJHfrl8WGr3iRdpUwz_CKMeH8zFkWfUb_iJZUjAcmaxrrvU4erVmgcZnOzffF35lb_VC_4Jw8ug_vi.AONdrkaG6zP30R5VRKAeozW6zDV8_5McRHzbV3jQREUEDXnjH4b2Y3lMRCJ94yp2O7EE9FfZ3bZjJbjTUu6I1WLCv8S45ByLbvC_wHeGx24jDLirMu7LI- Received: from [75.158.17.63] by web51806.mail.re2.yahoo.com via HTTP; Wed, 04 Nov 2009 01:51:08 PST X-Mailer: YahooMailRC/211.6 YahooMailWebService/0.7.361.4 References: <143477.23789.qm@web51804.mail.re2.yahoo.com> <3a142e750911030408t25dd59b0rcda6eccd8c24c0c9@mail.gmail.com> Date: Wed, 4 Nov 2009 01:51:08 -0800 (PST) From: PseudoCylon To: Paul B Mahol In-Reply-To: <3a142e750911030408t25dd59b0rcda6eccd8c24c0c9@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-current@freebsd.org Subject: Re: Wireless usb + wep = no usbd_do_request X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 09:51:10 -0000 ----- Original Message ---- > From: Paul B Mahol > To: PseudoCylon > Cc: freebsd-current@freebsd.org > Sent: Tue, November 3, 2009 5:08:47 AM > Subject: Re: Wireless usb + wep = no usbd_do_request > > On 11/3/09, PseudoCylon wrote: > > Hi, > > > > I'm porting a wireless usb driver (if_run) to freebsd current, and I got > > stuck. Once I "ifconfig wlan0 wepkey 1:0x... weptxkey 1" I cannot call > > usbd_do_request() any more. Even ifconfig didn't exit. Chipset supports h/w > > en/decryption, so cannot write keys on chip. (It works without encryption, > > by the way.) > > > > So, I tried the same thing on another device, linksys wusb54gc with if_rum. > > It worked fine, but about 3 to 4 min later. (Just left it alone.) It started > > giving error > > rum0: could not multi read MAC register: USB_ERR_TIMEOUT and > > rum0: device timeout > > when ifconfig wlan0 down, > > rum0: could not multi write MAC register: USB_ERR_TIMEOUT > > which means failed on usbd_do_request() (This could be totally different > > issue.) > > I get this one multiple times after card got detached but vap was not > manually destroyed. > Recently I did not used if_rum more that 5 min I think(maybe in AP > mode when I was testing hidden ssid ...) > > > Any ideas, patches, or walkaround? > > Make sure how locks are handled between net80211, usb and driver itself. Thanks for the reply. I think that's just simple lock problem, too. Just I don't know what it is. I tried IEEE80211_LOCK IEEE80211_NODE_LOCK IEEE80211_NODE_ITERATE_LOCK but I cannot lock or unlock them. (I can lock IF_LOCK.) I just get "panic: mtx_lock of spin mutex(null)" For example, IEEE80211_LOCK is sleep mutex, and I can use it in newstate() no problem, but I some how it becomes spin mutex in key_set(). Once I find what is over writing lock type, I can make it work. Wish me a luck. > > > More info > > #uname -a > > FreeBSD 9.0-CURRENT FreeBSD 9.0-CURRENT #1 r198150M: Fri Oct 16 22:44:08 > > UTC 2009 amd64 > > > > ddb trace output 20+ minutes after "ifconfig wepkey" (using if_run) > > Tracing command ifconfig pid 1586 tid 100159 td 0xffffff000b3d3a80 > > sched_switch() at sched_switch+0x180 > > mi_switch() at mi_switch+0x21d > > sleepq_switch() at sleepq_switch+0x123 > > sleepq_wait() at sleepq_wait+0x4d > > _sleep() at _sleep+0x357 > > taskqueue_drain() at taskqueue_drain+0xc2 > > ieee80211_waitfor_parent() at ieee80211_waitfor_parent+0x3e > > ieee80211_ioctl() at ieee80211_ioctl+0x162 > > ifioctl() at ifioctl+0xde4 > > kern_ioctl() at kern_ioctl+0xc5 > > ioctl() at ioctl+0xfd > > syscall() at syscall+0x1af > > Xfast_syscall() at Xfast_syscall+0xe1 > > > > Also, sleep mutex became spin mutex. I get a panic > > panic: mtx_lock of spin mutex(null) > > It works fine before ifconfig wepkey. > > It is hard to tell without code example but wepkey works fine with > if_rum last time I tried, note that if_rum have done encryption in > software mode. __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now http://ca.toolbar.yahoo.com.