From owner-freebsd-drivers@FreeBSD.ORG Tue Jun 17 21:17:44 2008 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 914F5106567D for ; Tue, 17 Jun 2008 21:17:44 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id 0DD268FC20 for ; Tue, 17 Jun 2008 21:17:43 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by ug-out-1314.google.com with SMTP id q2so717973uge.37 for ; Tue, 17 Jun 2008 14:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=1trWCpCOBSHDm9MVRIgJz36RRio0IkhBhzNwLC1610A=; b=rFCXy/9l48AGEHIJfU1flnhVeGRE/D+qm0b+IVd5lpd2PWzacg6ytvXHAbKAWvpxhq tAOnLPXiwEH7vz5NhsvUtN/5c5udmYy2bi3kn5AjwQ0MqbhpHTtE/T1BrGz+TkJpWPRp MAfTLuF4N+SVR5Zncr6fHbsFvsXUoyV2TOMMU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=IL/dZWgcryEgOFE1KRbuvHtMkq4YemizuQJBgSwkCLnNRdt0WFaoyHKXvWr6+ZAg6Y ECY1MWh8wsvRZFmHONxmJLEFljjWACCTsMq9dVde6MluNwbZO+b2hzz//YLAtVFIf4Cj ku0BUks0s3ufXQxTVZbflvqJEi1npcOESLuPs= Received: by 10.210.49.7 with SMTP id w7mr8220196ebw.104.1213737462644; Tue, 17 Jun 2008 14:17:42 -0700 (PDT) Received: by 10.210.34.1 with HTTP; Tue, 17 Jun 2008 14:17:42 -0700 (PDT) Message-ID: <3c0b01820806171417l2b054e15i5627d88827cc03b4@mail.gmail.com> Date: Tue, 17 Jun 2008 17:17:42 -0400 From: "Alexander Sack" To: "Edwin L. Culp" In-Reply-To: <3c0b01820806171244g6f2ba46ybe0ba6d89eaab13b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <3c0b01820806170757v5565b59ne0e9d5db06f26761@mail.gmail.com> <4857D8BB.1080901@gmail.com> <3c0b01820806170852t39a6346doa6d77a655469eed9@mail.gmail.com> <20080617135900.18654t73s6d7sfqc@intranet.casasponti.net> <48580EB9.7090701@gmail.com> <20080617143554.1808562gg94i8ikg@intranet.casasponti.net> <3c0b01820806171244g6f2ba46ybe0ba6d89eaab13b@mail.gmail.com> Cc: freebsd-questions@freebsd.org, freebsd-drivers@freebsd.org Subject: Re: Atheros (ath) MSI wireless embedded chipset fails to attach on 7.0-STABLE X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 21:17:44 -0000 On Tue, Jun 17, 2008 at 3:44 PM, Alexander Sack wrote: > On Tue, Jun 17, 2008 at 3:35 PM, Edwin L. Culp wro= te: >> "Manolis Kiagias" escribi=F3: >> >>> Edwin L. Culp wrote: >>>> >>>> "Alexander Sack" escribi=F3: >>>> >>>>> On Tue, Jun 17, 2008 at 11:31 AM, Manolis Kiagias >>>>> wrote: >>>>>> >>>>>> Alexander Sack wrote: >>>>>>> >>>>>>> Hello: >>>>>>> >>>>>>> I have installed FreeBSD-7.0-amd64 stable on my new AMD X2 Turon ba= sed >>>>>>> notebook, a MSI-1710A (GX710Ax) which has a generic embedded >>>>>>> controller. During boot up I notice that ATH complains with: >>>>>>> >>>>>>> ath_rate: version 1.2 >>>>>>> ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, >>>>>>> RF5413) >>>>>>> ath0: mem 0xfd7f0000-0xfd7fffff irq 16 at devic= e >>>>>>> 0.0 >>>>>>> on pci2 >>>>>>> ath0: Reserved 0x10000 bytes for rid 0x10 type 3 at 0xfd7f0000 >>>>>>> ath0: [MPSAFE] >>>>>>> ath0: [ITHREAD] >>>>>>> ath0: unable to attach hardware; HAL status 13 >>>>>>> device_attach: ath0 attach returned 6 >>>>>>> >>>>>>> HAL status 13 from the header file seems to indicate that the >>>>>>> 7.0-STABLE driver doesn't support my hardware revision. Here is my >>>>>>> pciconf -l output: >>>>>>> >>>>>> >>>>>> Maybe you could try compiling a kernel with a newer hal. This is the >>>>>> kind of >>>>>> hack we use on the eeepc. Have a look at this: >>>>>> >>>>>> http://nighthack.org/wiki/EeeBSD >>>>> >>>>> Thank you SO much for this link. That's EXACTLY what I want to do >>>>> because I realize that this is a HAL problem. I've been searching >>>>> like MAD where I could get an updated binary HAL for this chipset >>>>> (PCIe based). >>>> >>>> That makes two of us ;) >>>> >>>> My dmesg is very, very similar to yours and hoped that this would work= . >>>> >>>> ath0: mem 0xf2200000-0xf220ffff irq 19 at device 0= .0 >>>> on pci5 >>>> ath0: Reserved 0x10000 bytes for rid 0x10 type 3 at 0xf2200000 >>>> ioapic0: routing intpin 19 (PCI IRQ 19) to vector 64 >>>> ath0: [MPSAFE] >>>> ath0: [ITHREAD] >>>> ath0: unable to attach hardware; HAL status 13 >>>> device_attach: ath0 attach returned 6 >>>> >>>> I followed the instructions from the web page, recompiled and it made = no >>>> difference which really worries me that I must have done something wro= ng. >>>> >>>> cd madwifi-ng-r2756+ar5007/hal >>>> cp -R * /usr/src/sys/contrib/dev/ath/ >>>> >>>> I did not erase it previously but am going to try that. I made no ke= rn >>>> configuration changes to find that the hal is from contrib. Is there >>>> nothing else I should do? >>>> >>>> Thanks, >>>> >>> >>> Well, I have only tested this on the eeepc and can confirm it works. >>> Maybe different atheros chipset have other problems not directly relate= d >>> to the hal version. >>> You do not need to do anything more that what is shown in the page: unt= ar, >>> replace the existing files, recompile / install kernel, reboot. If you = got >>> no errors during the kernel compilation phase, you can safely assume yo= u did >>> everything correctly, and the problem lies elsewhere. >> >> At least there was a ray of hope for the time it took to compile the ker= nel. > > Ed: > > I took recompiled and got the same issue. If I use the LATEST mad > distro I get some compile bugs (ath_desc_status was moved into > ath_desc structure in ah_desc.h) which I can't completely work around > (apparently the API into the HAL has changed as well). What I'm > trying to do is look at the Linux driver and understand the newer API > in order to get past this compile issue and see if this works. > Otherwise I believe we are SOL. > > Does anyone know if the CURRENT contains an updated ath HAL AND driver > for support of newer PCIe based chipsets? > > If I get it to work I will let you know... > Ok the trick is not to get it from the madfi project. Get it from the author directly! If you grab: http://people.freebsd.org/~sam/ath_hal-20080528.tgz Copy the contents into the src/sys/contrib/dev/ath/* and recompile, you should now see ath attach properly to the your NIC card. Thanks go to my friend jkim for pointing this out since he has a similar notebook/chipset and runs CURRENT successfully. I tried using CURRENT ath but there is to much vap support in it and it turned out the 7.0-RELEASE driver works. Now ath attaches properly and I'm going to test it out! (this is at least much further than a bad attach status code from the HAL). Let me know how it goes, -aps