Date: Thu, 27 Dec 2012 21:06:43 +0100 From: husyh@hush.com To: "Adrian Chadd" <adrian@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: ath0: unable to attach hardware Message-ID: <20121227200643.9F13DE6726@smtp.hushmail.com> In-Reply-To: <CAJ-VmonWCiuRnvewcCrf4-jaWxYJbWtCTG8GyOmeEPWq4EBeCg@mail.gmail.com> References: <20121123213551.C2CB9E6739@smtp.hushmail.com> <201212101437.54825.jhb@freebsd.org> <CAJ-VmomM965-=QByhJZMPUn_PZAnSjafcm3cy3ojRaPc5fbWPg@mail.gmail.com> <201212111549.49942.jhb@freebsd.org> <CAJ-VmonvJ4M5aJC9Mm5g%2B06Gfe=aoTg_p0NStj6gZtjkJ77Btw@mail.gmail.com> <20121213211100.5395F10E2C8@smtp.hushmail.com> <CAJ-Vmo=VYdCuoJDK4XLuQoB3gBob7LuhYDFF-F-G9_s4G8hM2w@mail.gmail.com> <20121214085607.3938D10E2C8@smtp.hushmail.com><CAJ-VmonWCiuRnvewcCrf4-jaWxYJbWtCTG8GyOmeEPWq4EBeCg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello, I hope you had a pleasant trip. Sorry for not replying for a while. Anyway, I tried to do what you asked me to. However, it seems like I misunderstood the handbook and/or your request, as I failed to compile the kernel. I copied my previous, working kernel config to a new file, and commented the devices ath, ath_pci, ath_hal and ath_rate_sample, as well as the options AH_SUPPORT_AR5416, AH_DEBUG and ATH_DEBUG. I did this because I could not find instructions in the handbook that explained how to build a module as a kld, and commenting the modules out was my best guess. Please point me to the relevant section in the handbook in the case that the information was actually there and I just was unable to find it. The full kernel config can be seen here: http://nopaste.info/d7475552bd.html Finally, I went to /usr/src and entered make buildkernel KERNCONF=PAVILIONNOATH This is what I suspect is the relevant output: cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys/modules/ath/../../dev/ath -I/usr/src/sys/modules/ath/../../dev/ath/ath_hal -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/src/sys/PAVILIONNOATH/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -fno-omit-frame-pointer -I/usr/obj/usr/src/sys/PAVILIONNOATH -mno-sse -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -c /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c In file included from /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c:55: @/net/if_var.h:125: error: 'IFNAMSIZ' undeclared here (not in a function) @/net/if_var.h:151: error: field 'if_data' has incomplete type cc1: warnings being treated as errors @/net/if_var.h:157: warning: 'struct sockaddr' declared inside parameter list @/net/if_var.h:157: warning: its scope is only this definition or declaration, which is probably not what you want @/net/if_var.h:167: warning: 'struct sockaddr' declared inside parameter list @/net/if_var.h:187: error: 'AF_MAX' undeclared here (not in a function) @/net/if_var.h:718: error: field 'if_data' has incomplete type /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c: In function 'ath_hal_attach': /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c:65: warning: dereferencing 'void *' pointer /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c:65: error: request for member 'sc_ifp' in something not a structure or union /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c:70: warning: dereferencing 'void *' pointer /usr/src/sys/modules/ath/../../dev/ath/ath_hal/ah.c:70: error: request for member 'sc_ifp' in something not a structure or union *** Error code 1 The full output has been posted to http://nopaste.info/408e62ac0f.html I'm willing and hoping to help troubleshoot this issue, but please keep in mind that I'm new to FreeBSD, so please give detailed instructions whenever you can. Thank you very much! > >Hi, > >Ok. I'm travelling for a little bit; if I don't reply in a few >days, >please poke me again. > >It may be that the device is asleep for a bit longer (failing this >test) and has completed resetting at this point. > >It may be that the power on sequence is not quite right for some >reason. > >Would you mind recompiling your kernel and making if_ath a kld, >rather >than statically in the kernel? > >Thanks, > > >Adrian > >> >> attached to this e-mail you find the output of dmesg. What I >guess the most relevant lines could be is: >> >> ath0: <Atheros 5413> mem 0xfdee0000-0xfdeeffff irq 16 at device >4.0 on pci2 >> ar5212ChipTest: address test failed addr: 0x00008000 - >wr:0x00000000 != rd:0xffffffff >> ar5212Attach: hardware self-test failed >> ath0: unable to attach hardware; HAL status 14 >> device_attach: ath0 attach returned 6 >> >> I read the registers 4004 and 4010 again to make sure the values >still are the same, which indeed they are. >> >> I hope this helps. >> >> Thanks! >> >> On Donnerstag, 13. Dezember 2012 at 10:18 PM, "Adrian Chadd" ><adrian@freebsd.org> wrote: >>> >>>On 13 December 2012 13:11, <husyh@hush.com> wrote: >>>> Hello everyone, >>>> >>>> I'm afraid I still don't know what exactly BAR is, or how I get >>>its value that I'm supposed to plug into the line John provided: >>>> dd if=/dev/mem bs=4 iseek=((start of bar + reg offset)/4) >>>count=1 | hd >>>> >>>> I assumed that "start of bar" is 0xfdee0000 in my case, since >>>dmesg reports >>>> ath0: <Atheros 5413> mem 0xfdee0000-0xfdeeffff irq 16 at device >>>4.0 on pci2 >>> >>>Yup. >>> >>>> This is what I get: >>>> # dd if=/dev/mem bs=4 iseek=`echo "ibase=16; (FDEE0000+4004)/4" >>>| bc` count=1 | hd >>>> 00 00 01 00 >>>> # dd if=/dev/mem bs=4 iseek=`echo "ibase=16; (FDEE0000+4010)/4" >>>| bc` count=1 | hd >>>> 14 00 01 00 >>>> >>>> Please correct me if my assumption about "start of bar" was >>>wrong and/or I made some other mistake. >>>> Also, please don't hesitate to ask me to do anything else that >>>might help you during debugging. >>>> >>>> Thank you very much for the effort. >>> >>>Hm. Wait, what's the rest of the ath0: output? >>> >>> >>> >>>Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121227200643.9F13DE6726>