From owner-freebsd-mobile@FreeBSD.ORG Fri Nov 18 20:23:56 2005 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A855116A433 for ; Fri, 18 Nov 2005 20:23:56 +0000 (GMT) (envelope-from graham@bitmap.net) Received: from caulfield.bitmap.net (S0106000c4134f9aa.ed.shawcable.net [68.148.208.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5ACB43D68 for ; Fri, 18 Nov 2005 20:23:47 +0000 (GMT) (envelope-from graham@bitmap.net) Received: from localhost (unknown [127.0.0.1]) by caulfield.bitmap.net (Postfix) with ESMTP id 0366F159A66 for ; Fri, 18 Nov 2005 13:24:07 -0700 (MST) Received: from caulfield.bitmap.net ([127.0.0.1]) by localhost (caulfield.bitmap.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31144-05 for ; Fri, 18 Nov 2005 13:24:01 -0700 (MST) Received: from [10.1.60.4] (proxy.epsb.ca [198.161.119.4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by caulfield.bitmap.net (Postfix) with ESMTP id A626B15919C for ; Fri, 18 Nov 2005 13:24:01 -0700 (MST) Message-ID: <437E384C.409@bitmap.net> Date: Fri, 18 Nov 2005 13:23:40 -0700 From: Graham Bakay User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at bitmap.net Subject: Re: ndis 64-bit Broadcom 4318 on a Compaq R4125 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Nov 2005 20:23:56 -0000 >>>> Hi there, >>>> >>>> I'm trying to get ndis working with a 64-bit wireless driver on FreeBSD >>>> 6.0 amd64. The windows driver works using ndis on Ubuntu. >>>> >>>> I've used ndisgen to create the kernel module. When I try to load it, I >>>> get the following: >>>> >>>> no match for RtlZeroMemory >>>> no match for RtlCopyMemory >>>> ntoskrnl dummy called... >>>> ndis0: mem 0xb0204000-0xb0205fff irq >>>> 21 at device 2.0 on pci3 >>>> ndis0: NDIS API version: 5.1 >>>> ntoskrnl dummy called... >>>> ntoskrnl dummy called... >>>> [repeats multiple times] >>>> fpudna in kernel mode! >>>> [repeats multiple times] >>>> ntoskrnl dummy called... >>>> ntoskrnl dummy called... >>>> ndis0: NDIS ERROR: c000138d (unknown error) >>>> ndis0: init handler failed >>>> device_attach: ndis0 attach returned 6 >>>> >>>> Is there anything I can do to get this working in FreeBSD? Or is it just >>>> an incompatibility that I'll have to live with? >>>> >>>> Thanks, >>>> Graham. >>>> >>>> >>>> >>> Get the latest copies of the files in src/sys/compat/ndis and >>> src/sys/dev/if_ndis from the RELENG_6 branch. Note: you do _NOT_ have >>> to update your entire system, just the files in these directories. >>> The quickest way to do this is probably with anoncvs: >>> >>> % setenv CVSROOT anoncvs@anoncvs1.FreeBSD.org:/home/ncvs >>> % cvs checkout -rRELENG_6 src/sys/compat/ndis src/sys/dev/if_ndis >>> >>> You can also use a mirror if you're outside the US. See >>> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/anoncvs.html >>> for a list. >>> >>> Copy the files to src/sys/compat/ndis and src/sys/dev/if_ndis, >>> then rebuild ndis.ko and if_ndis.ko: >>> >>> # cd /sys/modules/ndis >>> # make; make install >>> # cd /sus/modules/if_ndis >>> # make; make install >>> >>> It should work then. I've been using the same driver on my dual Opteron >>> amd64 box at home for the past week and it's been very stable >>> (in SMP mode even): >>> >>> Nov 9 18:16:59 opteron kernel: ndis0: mem 0xe0210000-0xe0211fff irq 31 at device 1.0 on pci3 >>> Nov 9 18:16:59 opteron kernel: ndis0: NDIS API version: 5.1 >>> Nov 9 18:16:59 opteron kernel: fpudna in kernel mode! >>> Nov 9 18:17:01 opteron kernel: ndis0: Ethernet address: 00:30:bd:f5:ea:26 >>> >>> [/var/log]:opteron.moo.com{41}% uname -srm >>> FreeBSD 6.0-RELEASE amd64 >>> [/var/log]:opteron.moo.com{42}% uptime >>> 11:20AM up 6 days, 17:06, 14 users, load averages: 1.81, 1.52, 1.43 >>> >>> Note that the "fpudna in kernel mode!" message will still show up even >>> after you fix ndis.ko and if_ndis.ko, but the interface will work anyway. >>> The messages appear to be harmless for now. >>> >>> -Bill >>> >>> >>> >> No luck. I still get the same problem. Any other suggestions? I'm >> thinking I may try installing i386 on the laptop, since HP has 32-bit >> driver for the card (the driver I've been using is the one used by the >> Acer Ferrari, and worked in Linux). >> > > Hunh. It looks like the anoncvs archive I pointed you to is out of date. > > Oh, I see now. > > The entry on that page I showed you for the primary server is wrong. > It says this: > > * USA: freebsdanoncvs@anoncvs.FreeBSD.org:/home/ncvs (ssh only - no > password) > > It should say this: > > * USA: anoncvs@anoncvs.FreeBSD.org:/home/ncvs (ssh only - no > password) > > When I tried it, I used the broken version and it wouldn't let me > do a checkout, so I gave you directions for using the mirror instead. > But it looks like the mirror is stale. :( > > Try this instead: > > % setenv CVSROOT anoncvs@anoncvs.FreeBSD.org:/home/ncvs > % cvs checkout -rRELENG_6 src/sys/compat/ndis src/sys/dev/if_ndis > > This time you should get the right sources. Once you get them, build ndis.ko > and if_ndis.ko again like I said to before. Trust me, the code isn't broken: > I'm using it right this second. :) You don't need to resort to using the > laptop in x86 mode. > > -Bill > Success!!! I had trouble getting the files out of anoncvs. It kept telling me it couldn't find /home/ncvs/CVSROOT. I just grabbed the files off of WebCVS. A quick compile and kldload and presto! ndis0 is staring me in the face! Thanks for all the help Bill. I know you do a lot of work with ndis/wireless (among other things). FWIW, it's very much appreciated. Cheers! Graham.