From owner-freebsd-current@FreeBSD.ORG Thu Mar 4 18:23:55 2010 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 C9E42106564A; Thu, 4 Mar 2010 18:23:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7D58FC12; Thu, 4 Mar 2010 18:23:55 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1944346B0D; Thu, 4 Mar 2010 13:23:55 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id B580A8A01F; Thu, 4 Mar 2010 13:23:42 -0500 (EST) From: John Baldwin To: Miki Date: Thu, 4 Mar 2010 13:19:14 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20091223035331.GA1293@weongyo> <201003030751.45158.jhb@freebsd.org> <261c29701003040928h7aa70b3fm37611f974e0b9330@mail.gmail.com> In-Reply-To: <261c29701003040928h7aa70b3fm37611f974e0b9330@mail.gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201003041319.14675.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 04 Mar 2010 13:23:42 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-current@freebsd.org, Weongyo Jeong Subject: Re: Call for Test and Review: bwn(4) - another Broadcom Wireless driver 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: Thu, 04 Mar 2010 18:23:56 -0000 On Thursday 04 March 2010 12:28:59 pm Miki wrote: > 2010/3/3 John Baldwin : > > On Tuesday 02 March 2010 2:08:55 pm Miki wrote: > >> 2010/3/1 Weongyo Jeong : > >> > On Sun, Feb 28, 2010 at 08:45:32PM +0100, Miki wrote: > >> >> Hi, > >> >> > >> >> Thanks for the work ! > >> >> > >> >> I have some problems here when I try to create a wlan interface : > >> >> bwn_v4_ucode5: could not load firmware image, error 2 > >> >> bwn0: the fw file(bwn_v4_ucode5) not found > >> > > >> > Did you try to UP the interface withload loading bwn_v4_ucode.ko? If > >> > yes currently bwn(4) doesn't automatically load firmware module so you > >> > need to do it by hand. > >> > > >> > # kldload bwn_v4_ucode > >> > >> OK I have loaded bwn_v4_ucode before if_bwn and it works, > >> my bad, I should have read the man page more carefully. > >> > >> > > >> > The patch for this is ready to commit and it'll be happened soon. > >> > > >> >> I have installed bwn-firmware-kmod from ports but the only files I have in > >> >> /boot/modules are bwn_v4_lp_ucode.ko and bwn_v4_ucode.ko. So I tried to > >> >> copy bwn_v4_ucode to bwn_v4_ucode5 and it seems to work : wlan0 is > >> >> created, I can associate to an open Access Point and obtain a DHCP lease. > >> >> But if I try to do some network IO (browsing the web) the interface hang > >> >> (I cannot obtain a lease anymore). > >> > > >> > I have a exact same device like you have but I didn't encounter this > >> > issue. > >> > > >> > Are there any messages from bwn(4) when you the interface becomes hang? > >> > One more question, after the interface hang, does the system be hang > >> > also? > >> > >> I have no messages in the log (appart bwn0: need multicast update callback). > >> In fact it's not a hang, it happens only with the AP that permits me > >> to have a web > >> access. I have another AP (sitting next to me) and I don't have the > >> same behavior : > >> I can have and renew my dhcp lease multiple times and configure the AP with its > >> web interface. With the "buggy" AP I can have a dhcp lease only once and nothing > >> more. If I destroy and recreate the wlan interface the same thing happens. > >> I have no such a problem with if_bwi and this AP. > >> > >> > > >> > One thing you can do is that trying the device with PIO mode not DMA > >> > mode using the following tunable variable: > >> > > >> > hw.bwn.usedma > >> > > >> > Its default value is 1 to enable DMA operation so if you set it 0, PIO > >> > mode would be used and could see the message like below: > >> > > >> > bwn0: PIO > >> > > >> > Could you please test with it? > >> > > >> > >> Setting hw.bwn.usedma=0 in loader.conf make no differences > >> > >> by the way, I need to switch from if_bwn to if_bwi to make some test > >> and post the results here, but I have this error message : > >> firmware_register: cannot register image bwi_v3_b0g0initvals5, firmware > >> table full! > >> is this normal ? > > > > Yes, both bwi and bwn use a lot of individual firmware images, so loading > > both of them probably fills up the static array of firmware table entries. > > I think there is a constant in subr_firwmare.c you can increase to make the > > table bigger. > > > > -- > > John Baldwin > > > > Rising FIRMWARE_MAX from 30 to 60 did the trick ! thanks ! > Are there any reasons to have such a "low" default value ? I think the number was chosen somewhat randomly. I do think 30 firmware images is probably more than enough for common cases. One option would be to malloc the table at boot time and make the size configurable via a loader tunable. Otherwise we could just make it dynamic and use a linked-list of some sort instead of the current array. -- John Baldwin