From owner-freebsd-current@FreeBSD.ORG Tue Nov 3 12:08:49 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 835D2106568B for ; Tue, 3 Nov 2009 12:08:49 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1A58F8FC17 for ; Tue, 3 Nov 2009 12:08:48 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so860676eyd.9 for ; Tue, 03 Nov 2009 04:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=iTBkJ0dRWQ5iTd6CPPFjud6FBzr79F/kwbUtRC+s+2c=; b=d5jNL1v0UwggY5Jor2wFxXU2DWLbkYg/l8YLq/rDh5rdPJMxB5VG3Li23fppyDs5/9 lsrC6APG7HikrYxGhTonvqPkaBWR2Fm9Bm/0DWnN1Ncue9kNtbuglENaAAkJJFyki8np C3nYqOqEKg9gRUncz5Xc5lmy14otgOH4y9eAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=TxrwovCNFez3PKm4Vy4aDpkrqt4CJYYPEwMSMLRnSUaYdDQk9DyvqTtTlkP5eQrpaa sORzkUXms1lAElBII4geRizZR1y/LdIz30C9R6qmTBxBfw11NM9GpgIrekjKyBruiAIh hxAWxuohBp0aAzvSRdLlQmw9yVJxC+Tvlv3XA= MIME-Version: 1.0 Received: by 10.213.23.205 with SMTP id s13mr67335ebb.4.1257250127830; Tue, 03 Nov 2009 04:08:47 -0800 (PST) In-Reply-To: <143477.23789.qm@web51804.mail.re2.yahoo.com> References: <143477.23789.qm@web51804.mail.re2.yahoo.com> Date: Tue, 3 Nov 2009 13:08:47 +0100 Message-ID: <3a142e750911030408t25dd59b0rcda6eccd8c24c0c9@mail.gmail.com> From: Paul B Mahol To: PseudoCylon Content-Type: text/plain; charset=ISO-8859-1 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: Tue, 03 Nov 2009 12:08:49 -0000 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. > 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.