From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 31 17:42:26 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1D8F16A41F for ; Wed, 31 Aug 2005 17:42:25 +0000 (GMT) (envelope-from arundel@h3c.de) Received: from enterprise4.noxa.de (enterprise.noxa.de [212.60.197.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09CB043D48 for ; Wed, 31 Aug 2005 17:42:24 +0000 (GMT) (envelope-from arundel@h3c.de) Received: (qmail 8274 invoked from network); 31 Aug 2005 19:42:21 +0200 Received: from p508fc26c.dip.t-dialin.net (HELO localhost.skatecity) (80.143.194.108) by enterprise.noxa.de with AES256-SHA encrypted SMTP; 31 Aug 2005 19:42:21 +0200 Received: from localhost.skatecity (nobody@localhost.skatecity [127.0.0.1]) by localhost.skatecity (8.13.4/8.13.4) with ESMTP id j7VHgJsb001657 for ; Wed, 31 Aug 2005 19:42:19 +0200 (CEST) (envelope-from arundel@localhost.skatecity) Received: (from arundel@localhost) by localhost.skatecity (8.13.4/8.13.4/Submit) id j7VHgJ97001656 for freebsd-hackers@freebsd.org; Wed, 31 Aug 2005 19:42:19 +0200 (CEST) (envelope-from arundel) From: Alexander Best Date: Wed, 31 Aug 2005 19:42:19 +0200 To: freebsd-hackers@freebsd.org Message-ID: <20050831174218.GA1522@skatecity> Mail-Followup-To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Organisation: =?iso-8859-15?Q?Westfl=E4lische_Wilhelms-U?= =?iso-8859-15?Q?niversit=E4t_M=FCnster?= Subject: Problem with ath(4) and Netgear WG311T card X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2005 17:42:26 -0000 I just bought myseld a new wlan card called Netgear WG311T (ath(4) lists it as being supported). Here's the ouput of `pciconf -lv`: ath0@pci0:10:0: class=0x020000 card=0x1a001385 chip=0x0013168c rev=0x01 \ hdr=0x00 vendor = 'Atheros Communications Inc.' device = 'AR5212, AR5213 802.11a/b/g Wireless Adapter' class = network subclass = ethernet When I try to load the ath(4) driver I get this error message: ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413) ath0: mem 0x84800000-0x8480ffff irq 15 at device 10.0 on pci0 ath0: unable to attach hardware; HAL status 3 device_attach: ath0 attach returned 6 I checked sys/contrib/dev/ath/ah.h as described in ath(4) and this is what I found: HAL_EIO = 3, /* Hardware didn't respond as expected */ I asked a guy in #madwifi and he pointed me to a website with a Q&A stating the following: Q: When I load the ath_pci module I get ?unable to attach hardware: Hardware didn?t respond as expected, (HAL status 3)?! A: There exist pci-bridges which have difficulties with Atheros cards (and other hardware possibly). To get your card working you first have to find your pci-bridges pci-id with ?lspci?. After then you have to set the SUBORDINATE_BUS option for this pci-id with the ?setpci? tool. For example: schleppi:~$ lspci | grep -i ?pci bridge? 0000:00:01.0 PCI bridge: Intel Corp. 82845 845 (Brookdale) Chipset AGP \ Bridge 0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge schleppi:~$ setpci -s 0:1e.0 SUBORDINATE_BUS=0A I have chosen PCI bridge, because my problem existed only for mini-pci Atheros card. If you have problems with your cardbus card instead, you would chose your PCI to Cardbus controller possibly. Another possibility is a badly installed pci card - try removing it, dusting of the contacts and putting it firmy back into the slot. Alright I believe this is my PCI bridge: hostb0@pci0:0:0: class=0x060000 card=0x80331043 chip=0x03051106 \ rev=0x02 hdr=0x00 vendor = 'VIA Technologies Inc' device = 'VT8363/5 KT133/KM133 System Controller' class = bridge subclass = HOST-PCI I searched through the linux kernel sources and found the following definition in include/linux/pci.h: define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the \ bridge */ So this is what I did to do what the Q&A proposes: pcitweak -w 00:00:0 -b 0x1A 0xA However the value doesn't seem to have any effect, because I still get the same error. And if I check the PCI mem offset I set beforehand it doesn't seem to have done anything: pcitweak -r 00:00:0 -b 0x1A 0x00 Can somebody help me with this problem? There seems to be a problem with revisions of the card that use a the Atheros AR5213 chip. But those cards have a different `pciconf` output and loading if_ath exits with code 13 which stands for a wrong revision. I'd really appreciate it if somebody could help me out. I already tried the ndis driver, but ndiscvt finds stumbles accross a syntax error in the *.inf file of the driver. Thx a bunch.