From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 1 15:07:05 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C196C1065673 for ; Mon, 1 Aug 2011 15:07:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7CCCD8FC16 for ; Mon, 1 Aug 2011 15:07:05 +0000 (UTC) Received: by qyk38 with SMTP id 38so3921702qyk.13 for ; Mon, 01 Aug 2011 08:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=TczCFCXyfXqC2G0wSD7ACCbrM1Y7h/LuZ/+0PZg7ZOY=; b=a2AUiteYV/zIQfvOV1l+P1cnws3T1Pj/NjtiwZtMPZs1pVcdtgNNEOwU6i6+2bbdys s4Y8tvRJvc/UgUb4ZToL+FskKb4Xo1lUPPFE5IRylZJYwvcRqeksDkNVAu289XxMXpAt 7sy9aJKa7FZWvd7FsxXhCnmESdZtNPmuNOPc4= MIME-Version: 1.0 Received: by 10.52.26.236 with SMTP id o12mr4290874vdg.497.1312211224854; Mon, 01 Aug 2011 08:07:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.161.165 with HTTP; Mon, 1 Aug 2011 08:07:04 -0700 (PDT) In-Reply-To: <20110801150242.GA14650@vesper.psych0tik.net> References: <20110801005639.GB20219@richh-desktop.boxdice.com.au> <20110801030038.GB77144@DataIX.net> <20110801031706.GB31782@richh-desktop.boxdice.com.au> <20110801150242.GA14650@vesper.psych0tik.net> Date: Mon, 1 Aug 2011 23:07:04 +0800 X-Google-Sender-Auth: ZX065C_zcgUbmzS63HZpYFtcRA8 Message-ID: From: Adrian Chadd To: richo Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-wireless@freebsd.org Subject: Re: Ath works as module, not inkernel X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:07:05 -0000 Try adding hw.ath.hal.debug=3D0x4 to /boot/loader.conf ; just to get some boot-time reset logging going. I'd like to see what the exact condition is that's triggering that HAL attach failure (it's either "can't wakeup chip" or "can't reset chip".) Adrian On 1 August 2011 23:03, richo wrote: > On 01/08/11 11:20 +0800, Adrian Chadd wrote: >> >> On 1 August 2011 11:17, richo wrote: >> >>>> Should be noted .... does this happen with a generic kernel ? The >>>> default ATH setup works perfectly and I can attest to it working just >>>> fine built in here. >>> >>> First thing I tried was with GENERIC (iirc, freeBSD doesn't support any >>> other >>> configuration?) and still no dice. >>> >>> Adrian, I saw your post and I will have a look at what that function >>> returns >>> to see if I can track it down. >> >> ok. I bet you'll find that the hardware just wasn't setup correctly at >> the time where ath was being probed. >> >> This could be because of things like ACPI extensions not having turned >> on the NIC (software rfkill, for example) or something equally >> strange. >> >> If you can get it reproducable, we can work on it together. >> >> >> Adrian > > Hi Adrian, > > I had a bit more of a play- it seems that it's something to do with how > loader.conf arranges the module insertion. > > dmesg: > > > Copyright (c) 1992-2011 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > =A0 =A0 =A0 =A0The Regents of the University of California. All rights re= served. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 9.0-BETA1 #17 r224492: Sat Jul 30 11:48:28 EST 2011 > =A0 =A0root@solitaire.psych0tik.net:/usr/obj/usr/src/sys/SOLITAIRE i386 > CPU: Intel(R) Pentium(R) M processor 1300MHz (1298.92-MHz 686-class CPU) > =A0Origin =3D "GenuineIntel" =A0Id =3D 0x695 =A0Family =3D 6 =A0Model =3D= 9 =A0Stepping =3D 5 > =A0Features=3D0xa7e9f9bf > =A0Features2=3D0x180 > real memory =A0=3D 536870912 (512 MB) > avail memory =3D 511254528 (487 MB) > kbd1 at kbdmux0 > acpi0: on motherboard > acpi0: reservation of 0, 9fc00 (3) failed > acpi0: reservation of 100000, 1fef0000 (3) failed > Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 > cpu0: on acpi0 > acpi_acad0: on acpi0 > battery0: on acpi0 > battery1: on acpi0 > acpi_lid0: on acpi0 > acpi_button0: on acpi0 > acpi_button1: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci_link1: BIOS IRQ 11 for 0.31.INTB is invalid > pci0: on pcib0 > agp0: on hostb0 > pcib1: at device 1.0 on pci0 > pci1: on pcib1 > vgapci0: port 0xc000-0xc0ff mem > 0xe8000000-0xefffffff,0xfcff0000-0xfcffffff irq 11 at device 0.0 on pci1 > uhci0: port 0xbf80-0xbf9f irq= 11 > at device 29.0 on pci0 > usbus0: on uhci0 > uhci1: port 0xbf40-0xbf5f irq= 11 > at device 29.1 on pci0 > usbus1: on uhci1 > uhci2: port 0xbf20-0xbf3f irq= 11 > at device 29.2 on pci0 > usbus2: on uhci2 > ehci0: mem > 0xf4fffc00-0xf4ffffff irq 11 at device 29.7 on pci0 > usbus3: EHCI version 1.0 > usbus3: on ehci0 > pcib2: at device 30.0 on pci0 > pci_link1: BIOS IRQ 11 for 2.3.INTA is invalid > pci2: on pcib2 > bge0: > mem 0xfaff0000-0xfaffffff irq 11 at device 0.0 on pci2 > bge0: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI > miibus0: on bge0 > brgphy0: PHY 1 on miibus0 > brgphy0: =A010baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, > 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow > bge0: Ethernet address: 00:0b:db:08:52:77 > cbb0: at device 1.0 on pci2 > cardbus0: on cbb0 > cbb1: at device 1.1 on pci2 > cardbus1: on cbb1 > pci2: at device 3.0 (no driver attached) > isab0: at device 31.0 on pci0 > isa0: on isab0 > atapci0: port > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xbfa0-0xbfaf at device 31.1 on pci0 > ata0: on atapci0 > ata1: on atapci0 > pcm0: port 0xb800-0xb8ff,0xbc40-0xbc7f mem > 0xf4fff800-0xf4fff9ff,0xf4fff400-0xf4fff4ff irq 9 at device 31.5 on pci0 > pcm0: > pci0: at device 31.6 (no driver attached) > acpi_tz0: on acpi0 > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > kbd0 at atkbd0 > atkbd0: [GIANT-LOCKED] > psm0: irq 12 on atkbdc0 > psm0: [GIANT-LOCKED] > psm0: model GlidePoint, device ID 0 > atrtc0: port 0x70-0x71,0x72-0x77 irq 8 on acpi0 > Event timer "RTC" frequency 32768 Hz quality 0 > attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 > Timecounter "i8254" frequency 1193182 Hz quality 0 > Event timer "i8254" frequency 1193182 Hz quality 100 > uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 > pmtimer0 on isa0 > sc0: at flags 0x100 on isa0 > sc0: VGA <16 virtual consoles, flags=3D0x300> > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 > est0: on cpu0 > p4tcc0: on cpu0 > Timecounters tick every 1.000 msec > usbus0: 12Mbps Full Speed USB v1.0 > usbus1: 12Mbps Full Speed USB v1.0 > usbus2: 12Mbps Full Speed USB v1.0 > usbus3: 480Mbps High Speed USB v2.0 > cbb1: 16-bit card inserted, but no pccard bus. > ugen0.1: at usbus0 > uhub0: on usbus0 > ugen1.1: at usbus1 > uhub1: on usbus1 > ugen2.1: at usbus2 > uhub2: on usbus2 > ugen3.1: at usbus3 > uhub3: on usbus3 > ada0 at ata0 bus 0 scbus0 target 0 lun 0 > ada0: ATA-5 device > ada0: 100.000MB/s transfers (UDMA5, PIO 8192bytes) > ada0: 19077MB (39070080 512 byte sectors: 16H 63S/T 16383C) > ada0: Previously was known as ad0 > cd0 at ata1 bus 0 scbus1 target 0 lun 0 > cd0: Removable CD-ROM SCSI-0 device cd0: > 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes) > cd0: cd present [3989280 x 2048 byte records] > ath0: mem 0xf6010000-0xf601ffff irq 11 at device 0.0 on > cardbus0 > ath0: unable to attach hardware; HAL status 3 > device_attach: ath0 attach returned 6 > uhub0: 2 ports with 2 removable, self powered > uhub1: 2 ports with 2 removable, self powered > uhub2: 2 ports with 2 removable, self powered > uhub3: 6 ports with 6 removable, self powered > Trying to mount root from ufs:/dev/ad0s1a [rw]... > fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8 > -----------8<---------------------------- > interface wlan.1 already present in the KLD 'kernel'! > ath0: mem 0xf6010000-0xf601ffff irq 11 at device 0.0 on > cardbus0 > ath0: AR2413 mac 7.9 RF2413 phy 4.5 > wlan0: Ethernet address: 00:15:e9:45:a5:84 > wlan0: link state changed to UP > > The mark where the --------8<----- is is where I began playing with the > computer, unloading if_ath.ko and if_ath_pci.ko with kldunload and then > loading them again with kldload got the card working.. looks like a race > condition to me? > > Ignore the interface wlan.1 line, I tried loading the wlan.ko in case it > would help. > > -- > richo || Today's excuse: > Defunct processes >