From owner-freebsd-current@FreeBSD.ORG Wed Nov 4 12:40:27 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 7F5821065695 for ; Wed, 4 Nov 2009 12:40:27 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-ew0-f218.google.com (mail-ew0-f218.google.com [209.85.219.218]) by mx1.freebsd.org (Postfix) with ESMTP id 10BCF8FC1D for ; Wed, 4 Nov 2009 12:40:26 +0000 (UTC) Received: by ewy18 with SMTP id 18so497982ewy.43 for ; Wed, 04 Nov 2009 04:40:26 -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=+vcqiNz+fkGY8ebpExucdCo1b0RRItz04K+d0La7uxw=; b=FfHCyWUNJO+Fzx0/XJNH5O1OmWekdWzPPJHjJtgOsxmjj8dlkL0A3IvpbL/WuYRaTO Gfu9VBK6F9Lt5T0hGxwhjtRxBR5YgZeVFw1YakvBnTbn7QFTFyxiD7JA5xd+06zz2rk2 Dpitk1l7hzoyMWOKuyQS2hpJKoD9y5kBiSf3U= 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=GrWnnGHWT8CbuS3XsSQzwCnanaHeg/loy4OMzVDRjtXnmQ+KqyxkInHT4aHw4D1cLA rY3gnThoy+zgCAN3IfBHcRRTTgcBtWoEwuQrVzpjjPRd1PTEyIRxJLY/bjCvM9OWrcSw nzSY3ayNHklOWszNdM6ei2PotisH3ssAL+Bbo= MIME-Version: 1.0 Received: by 10.213.2.73 with SMTP id 9mr1672129ebi.21.1257338426126; Wed, 04 Nov 2009 04:40:26 -0800 (PST) In-Reply-To: <950696.93705.qm@web51806.mail.re2.yahoo.com> References: <143477.23789.qm@web51804.mail.re2.yahoo.com> <3a142e750911030408t25dd59b0rcda6eccd8c24c0c9@mail.gmail.com> <950696.93705.qm@web51806.mail.re2.yahoo.com> Date: Wed, 4 Nov 2009 13:40:26 +0100 Message-ID: <3a142e750911040440h294da813m4b392da9c1b6e692@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: Wed, 04 Nov 2009 12:40:27 -0000 On 11/4/09, PseudoCylon wrote: > ----- 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. Look other freebsd usb drivers for example when un/lock is required, also you need to have you own driver lock - and you need to really know when to use it.