From owner-freebsd-mobile@FreeBSD.ORG Sun Feb 17 18:46:52 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D92F16A417 for ; Sun, 17 Feb 2008 18:46:52 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id 497A213C44B for ; Sun, 17 Feb 2008 18:46:52 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [172.16.6.246] (c-24-61-74-156.hsd1.ma.comcast.net [24.61.74.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id D6BAA1CC36; Sun, 17 Feb 2008 13:29:02 -0500 (EST) Message-ID: <47B87D41.50604@fid4.com> Date: Sun, 17 Feb 2008 13:30:25 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org, "Michael C. Cambria" Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Sun, 17 Feb 2008 18:46:52 -0000 I use a Cardbus to PCI adapter in a FreeBSD 7 desktop machine. My old 802.11b card (wi) was just swapped with a 802.11g, Netgear WPN511 (using the AR5212 chipset). FreeBSD doesn't see the card at all. No lights on the card are on as well. /var/log/messages also doesn't show anything. Does anyone else use this combination (PCI/Cardbus adapter & WPN511?) I checked the ath man page, it explicitly says the AR5212 chip is supported. The kernel (GENERIC) is compiled with ath support: # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm device wlan_scan_ap # 802.11 AP mode scanning device wlan_scan_sta # 802.11 STA mode scanning device ath # Atheros pci/cardbus NIC's device ath_hal # Atheros HAL (Hardware Access Layer) device ath_rate_sample # SampleRate tx rate control for ath I tested the card on a laptop, just to ensure that is wasn't DOA. The card itself works just fine. The PCI/Cardbus adapter works just fine when I put the old (wi) Netgear car in, as well as other (Orinoco) cards. So that part of the HW seems ok. MikeC From owner-freebsd-mobile@FreeBSD.ORG Mon Feb 18 22:42:20 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E08016A419 for ; Mon, 18 Feb 2008 22:42:20 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC5E13C4D1 for ; Mon, 18 Feb 2008 22:42:20 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [192.168.1.102] (c-24-61-74-156.hsd1.ma.comcast.net [24.61.74.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id 434521CC4A; Mon, 18 Feb 2008 17:42:19 -0500 (EST) Message-ID: <47BA0A1E.4030502@fid4.com> Date: Mon, 18 Feb 2008 17:43:42 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org, "Michael C. Cambria" References: <47B87D41.50604@fid4.com> In-Reply-To: <47B87D41.50604@fid4.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Mon, 18 Feb 2008 22:42:20 -0000 Michael C. Cambria wrote: > > I use a Cardbus to PCI adapter in a FreeBSD 7 desktop machine. My old > 802.11b card (wi) was just swapped with a 802.11g, Netgear WPN511 (using > the AR5212 chipset). FreeBSD doesn't see the card at all. No lights on > the card are on as well. /var/log/messages also doesn't show anything. I tried booting from the 6.3-Release install CD (and also 7.0 RC2 snapshot iso) and still no luck. However, booting these same CD's on a laptop (i.e. no PCI->Cardbus adapter) the very same card is recognized. sysinstall lets me config ath0 and used the CD as a live filesystem allows traffic to pass. The PCI->Cardbus adapter works with other 802.11b cards though, so I'm guessing something about this combination is the issue. Any ideas? Thanks, MikeC From owner-freebsd-mobile@FreeBSD.ORG Tue Feb 19 00:29:09 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EFD116A494 for ; Tue, 19 Feb 2008 00:29:09 +0000 (UTC) (envelope-from Benjamin.Close@clearchain.com) Received: from ipmail01.adl6.internode.on.net (ipmail01.adl6.internode.on.net [203.16.214.146]) by mx1.freebsd.org (Postfix) with ESMTP id 9908513C4CE for ; Tue, 19 Feb 2008 00:29:07 +0000 (UTC) (envelope-from Benjamin.Close@clearchain.com) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAFuvuUd5LZlP/2dsb2JhbACBWYphoGc X-IronPort-AV: E=Sophos;i="4.25,373,1199626200"; d="scan'208";a="44564816" Received: from ppp121-45-153-79.lns11.adl6.internode.on.net (HELO mail.clearchain.com) ([121.45.153.79]) by ipmail01.adl6.internode.on.net with ESMTP; 19 Feb 2008 10:59:06 +1030 Received: from benjamin-closes-powerbook-g4-12.local (wcl.ml.unisa.edu.au [130.220.166.5]) (authenticated bits=0) by mail.clearchain.com (8.13.8/8.13.8) with ESMTP id m1J0SvAv035384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Feb 2008 10:59:03 +1030 (CST) (envelope-from Benjamin.Close@clearchain.com) Message-ID: <47BA23DC.9050509@clearchain.com> Date: Tue, 19 Feb 2008 11:03:32 +1030 From: Benjamin Close User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: "Michael C. Cambria" References: <47B87D41.50604@fid4.com> <47BA0A1E.4030502@fid4.com> In-Reply-To: <47BA0A1E.4030502@fid4.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.92.1, clamav-milter version 0.92.1 on pegasus.clearchain.com X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (mail.clearchain.com [192.168.154.1]); Tue, 19 Feb 2008 10:59:04 +1030 (CST) Cc: freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Tue, 19 Feb 2008 00:29:09 -0000 Michael C. Cambria wrote: > > > Michael C. Cambria wrote: >> >> I use a Cardbus to PCI adapter in a FreeBSD 7 desktop machine. My >> old 802.11b card (wi) was just swapped with a 802.11g, Netgear WPN511 >> (using the AR5212 chipset). FreeBSD doesn't see the card at all. No >> lights on the card are on as well. /var/log/messages also doesn't >> show anything. > > I tried booting from the 6.3-Release install CD (and also 7.0 RC2 > snapshot iso) and still no luck. > > However, booting these same CD's on a laptop (i.e. no PCI->Cardbus > adapter) the very same card is recognized. sysinstall lets me config > ath0 and used the CD as a live filesystem allows traffic to pass. > > The PCI->Cardbus adapter works with other 802.11b cards though, so I'm > guessing something about this combination is the issue. > Perhaps the relevant sections of a boot -v and pciconf -lv could help. From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 14:05:14 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB01216A400 for ; Wed, 20 Feb 2008 14:05:14 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id AB0C513C50A for ; Wed, 20 Feb 2008 14:05:14 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [172.28.30.66] (westford-nat.juniper.net [66.129.232.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id 260F11CC75; Wed, 20 Feb 2008 09:03:10 -0500 (EST) Message-ID: <47BC32E0.3020307@fid4.com> Date: Wed, 20 Feb 2008 09:02:08 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org References: <47B87D41.50604@fid4.com> <47BA0A1E.4030502@fid4.com> <47BA23DC.9050509@clearchain.com> In-Reply-To: <47BA23DC.9050509@clearchain.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Benjamin Close Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 14:05:15 -0000 Benjamin Close wrote: > > Perhaps the relevant sections of a boot -v and pciconf -lv could help. When I made this discovery, I didn't have access to the system with the pic->cardbus, just the laptop. I have tried with another ath based card which arrived last night, with the same result. Here is pciconf -lv and boot -v with the Netgear WPN511 plugged in at boot time. The pci->cardbus adapter is detected. Using various 802.11b cards, it works just fine. cbb0@pci0:1:8:0: class=0x060700 card=0x3000133f chip=0xac50104c rev=0x01 hdr=0x02 vendor = 'Texas Instruments (TI)' device = 'PCI1410 PC card cardBus Controller' class = bridge subclass = PCI-CardBus wlan_amrr: wlan: <802.11 Link Layer> ath_rate: version 1.2 null: nfslock: pseudo-device random: io: kbd: new array size 4 kbd1 at kbdmux0 mem: Pentium Pro MTRR support enabled ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) [deleted] cbb0: at device 8.0 on pci1 pcib1: cbb0 requested memory range 0xfe900000-0xfeafffff: good cbb0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0xfe900000 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 pcib1: matched entry for 1.8.INTA pcib1: slot 8 INTA hardwired to IRQ 17 ioapic0: routing intpin 17 (PCI IRQ 17) to vector 53 cbb0: [MPSAFE] cbb0: [ITHREAD] cbb0: PCI Configuration space: 0x00: 0xac50104c 0x02100107 0x06070001 0x00024010 0x10: 0xfe900000 0x020000a0 0x20030201 0xfffff000 0x20: 0x00000000 0xfffff000 0x00000000 0xfffffffc 0x30: 0x00000000 0xfffffffc 0x00000000 0x07400111 0x40: 0x3000133f 0x00000001 0x00000000 0x00000000 0x50: 0x00000000 0x00000000 0x00000000 0x00000000 0x60: 0x00000000 0x00000000 0x00000000 0x00000000 0x70: 0x00000000 0x00000000 0x00000000 0x00000000 0x80: 0x0844b060 0x00000000 0x00000000 0x00001d92 0x90: 0x600200c0 0x00000000 0x00000000 0x00000000 0xa0: 0xfe110001 0x00c00000 0x0000000b 0x0000001f 0xb0: 0x08000000 0x00000000 0x00000000 0x00000000 0xc0: 0x00000000 0x00000000 0x00000000 0x00000000 0xd0: 0x00000000 0x00000000 0x00000000 0x00000000 0xe0: 0x00000000 0x00000000 0x00000000 0x00000000 0xf0: 0x00000000 0x00000000 0x00000000 0x00000000 em0: port 0xdec0-0xdeff mem 0xfe9e0000-0xfe9fffff irq 18 at device 12.0 on pci1 em0: Reserved 0x20000 bytes for rid 0x10 type 3 at 0xfe9e0000 MikeC From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 16:38:52 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A1B016A403 for ; Wed, 20 Feb 2008 16:38:52 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 15A9713C459 for ; Wed, 20 Feb 2008 16:38:51 +0000 (UTC) (envelope-from sam@errno.com) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m1KGcWpR055831 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Feb 2008 08:38:32 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <47BC5788.3010706@errno.com> Date: Wed, 20 Feb 2008 08:38:32 -0800 From: Sam Leffler User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: "Michael C. Cambria" References: <47B87D41.50604@fid4.com> <47BA0A1E.4030502@fid4.com> <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> In-Reply-To: <47BC32E0.3020307@fid4.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: Benjamin Close , freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 16:38:52 -0000 Michael C. Cambria wrote: > Benjamin Close wrote: >> >> Perhaps the relevant sections of a boot -v and pciconf -lv could help. > > When I made this discovery, I didn't have access to the system with > the pic->cardbus, just the laptop. > I have tried with another ath based card which arrived last night, > with the same result. Here is pciconf -lv and boot -v with the > Netgear WPN511 plugged in at boot time. The pci->cardbus adapter is > detected. Using various 802.11b cards, it works just fine. > > cbb0@pci0:1:8:0: class=0x060700 card=0x3000133f chip=0xac50104c > rev=0x01 hdr=0x02 > vendor = 'Texas Instruments (TI)' > device = 'PCI1410 PC card cardBus Controller' > class = bridge > subclass = PCI-CardBus > > wlan_amrr: > wlan: <802.11 Link Layer> > ath_rate: version 1.2 > null: > nfslock: pseudo-device > random: > io: > kbd: new array size 4 > kbd1 at kbdmux0 > mem: > Pentium Pro MTRR support enabled > ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, > RF5413) > > [deleted] > > cbb0: at device 8.0 on pci1 > pcib1: cbb0 requested memory range 0xfe900000-0xfeafffff: good > cbb0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0xfe900000 > cardbus0: on cbb0 > pccard0: <16-bit PCCard bus> on cbb0 > pcib1: matched entry for 1.8.INTA > pcib1: slot 8 INTA hardwired to IRQ 17 > ioapic0: routing intpin 17 (PCI IRQ 17) to vector 53 > cbb0: [MPSAFE] > cbb0: [ITHREAD] > cbb0: PCI Configuration space: > 0x00: 0xac50104c 0x02100107 0x06070001 0x00024010 > 0x10: 0xfe900000 0x020000a0 0x20030201 0xfffff000 > 0x20: 0x00000000 0xfffff000 0x00000000 0xfffffffc > 0x30: 0x00000000 0xfffffffc 0x00000000 0x07400111 > 0x40: 0x3000133f 0x00000001 0x00000000 0x00000000 > 0x50: 0x00000000 0x00000000 0x00000000 0x00000000 > 0x60: 0x00000000 0x00000000 0x00000000 0x00000000 > 0x70: 0x00000000 0x00000000 0x00000000 0x00000000 > 0x80: 0x0844b060 0x00000000 0x00000000 0x00001d92 > 0x90: 0x600200c0 0x00000000 0x00000000 0x00000000 > 0xa0: 0xfe110001 0x00c00000 0x0000000b 0x0000001f > 0xb0: 0x08000000 0x00000000 0x00000000 0x00000000 > 0xc0: 0x00000000 0x00000000 0x00000000 0x00000000 > 0xd0: 0x00000000 0x00000000 0x00000000 0x00000000 > 0xe0: 0x00000000 0x00000000 0x00000000 0x00000000 > 0xf0: 0x00000000 0x00000000 0x00000000 0x00000000 > em0: port > 0xdec0-0xdeff mem 0xfe9e0000-0xfe9fffff irq 18 at device 12.0 on pci1 > em0: Reserved 0x20000 bytes for rid 0x10 type 3 at 0xfe9e0000 > This sounds like an issue I hit recently. It appears the cardbus code broke sometime between 6.x and 7.0 causing the card to not be powered up. It looks to be specific to this bridge/cardbus chip. Warner is aware of the issue but I'm not sure if he's found time to look at it (or if he can reproduce it). Sam From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 16:47:40 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B301816A411 for ; Wed, 20 Feb 2008 16:47:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 55CFF13C4EB for ; Wed, 20 Feb 2008 16:47:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m1KGhESm070352; Wed, 20 Feb 2008 09:43:14 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 20 Feb 2008 09:43:14 -0700 (MST) Message-Id: <20080220.094314.59709634.imp@bsdimp.com> To: sam@errno.com From: Warner Losh In-Reply-To: <47BC5788.3010706@errno.com> References: <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> <47BC5788.3010706@errno.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: mcc@fid4.com, Benjamin.Close@clearchain.com, freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 16:47:40 -0000 From: Sam Leffler Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter Date: Wed, 20 Feb 2008 08:38:32 -0800 > Michael C. Cambria wrote: > > Benjamin Close wrote: > >> > >> Perhaps the relevant sections of a boot -v and pciconf -lv could help. > > > > When I made this discovery, I didn't have access to the system with > > the pic->cardbus, just the laptop. > > I have tried with another ath based card which arrived last night, > > with the same result. Here is pciconf -lv and boot -v with the > > Netgear WPN511 plugged in at boot time. The pci->cardbus adapter is > > detected. Using various 802.11b cards, it works just fine. > > > > cbb0@pci0:1:8:0: class=0x060700 card=0x3000133f chip=0xac50104c > > rev=0x01 hdr=0x02 > > vendor = 'Texas Instruments (TI)' > > device = 'PCI1410 PC card cardBus Controller' > > class = bridge > > subclass = PCI-CardBus > > > > wlan_amrr: > > wlan: <802.11 Link Layer> > > ath_rate: version 1.2 > > null: > > nfslock: pseudo-device > > random: > > io: > > kbd: new array size 4 > > kbd1 at kbdmux0 > > mem: > > Pentium Pro MTRR support enabled > > ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, > > RF5413) > > > > [deleted] > > > > cbb0: at device 8.0 on pci1 > > pcib1: cbb0 requested memory range 0xfe900000-0xfeafffff: good > > cbb0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0xfe900000 > > cardbus0: on cbb0 > > pccard0: <16-bit PCCard bus> on cbb0 > > pcib1: matched entry for 1.8.INTA > > pcib1: slot 8 INTA hardwired to IRQ 17 > > ioapic0: routing intpin 17 (PCI IRQ 17) to vector 53 > > cbb0: [MPSAFE] > > cbb0: [ITHREAD] > > cbb0: PCI Configuration space: > > 0x00: 0xac50104c 0x02100107 0x06070001 0x00024010 > > 0x10: 0xfe900000 0x020000a0 0x20030201 0xfffff000 > > 0x20: 0x00000000 0xfffff000 0x00000000 0xfffffffc > > 0x30: 0x00000000 0xfffffffc 0x00000000 0x07400111 > > 0x40: 0x3000133f 0x00000001 0x00000000 0x00000000 > > 0x50: 0x00000000 0x00000000 0x00000000 0x00000000 > > 0x60: 0x00000000 0x00000000 0x00000000 0x00000000 > > 0x70: 0x00000000 0x00000000 0x00000000 0x00000000 > > 0x80: 0x0844b060 0x00000000 0x00000000 0x00001d92 > > 0x90: 0x600200c0 0x00000000 0x00000000 0x00000000 > > 0xa0: 0xfe110001 0x00c00000 0x0000000b 0x0000001f > > 0xb0: 0x08000000 0x00000000 0x00000000 0x00000000 > > 0xc0: 0x00000000 0x00000000 0x00000000 0x00000000 > > 0xd0: 0x00000000 0x00000000 0x00000000 0x00000000 > > 0xe0: 0x00000000 0x00000000 0x00000000 0x00000000 > > 0xf0: 0x00000000 0x00000000 0x00000000 0x00000000 > > em0: port > > 0xdec0-0xdeff mem 0xfe9e0000-0xfe9fffff irq 18 at device 12.0 on pci1 > > em0: Reserved 0x20000 bytes for rid 0x10 type 3 at 0xfe9e0000 > > > This sounds like an issue I hit recently. It appears the cardbus code > broke sometime between 6.x and 7.0 causing the card to not be powered > up. It looks to be specific to this bridge/cardbus chip. Warner is > aware of the issue but I'm not sure if he's found time to look at it (or > if he can reproduce it). I can't reproduce it on my machine(s) here. Next time I'm colocated with someone who can reproduce it, I'll look into it. So far there's been no common thread between the different people seeing the problem (well, in these two data points now). There are two different bugs that I'm aware of. One is pci bus numbering (which means that *NO* cardbus cards will work, but all 16-bit "r2" cards will work). The other is the power issue that Sam is talking about. But the first issue should be identical in both 6.x and 7.0. I hope to have a fix for this before 7.1 ships. Warner From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 16:57:35 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2396C16A409 for ; Wed, 20 Feb 2008 16:57:35 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id E3EA613C4CE for ; Wed, 20 Feb 2008 16:57:34 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [172.28.30.66] (westford-nat.juniper.net [66.129.232.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id 611E41D00E; Wed, 20 Feb 2008 11:57:34 -0500 (EST) Message-ID: <47BC5BC4.5070007@fid4.com> Date: Wed, 20 Feb 2008 11:56:36 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Sam Leffler References: <47B87D41.50604@fid4.com> <47BA0A1E.4030502@fid4.com> <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> <47BC5788.3010706@errno.com> In-Reply-To: <47BC5788.3010706@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Benjamin Close , freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 16:57:35 -0000 Sam Leffler wrote: > This sounds like an issue I hit recently. It appears the cardbus code > broke sometime between 6.x and 7.0 causing the card to not be powered > up. It looks to be specific to this bridge/cardbus chip. Warner is > aware of the issue but I'm not sure if he's found time to look at it > (or if he can reproduce it). I assume you are talking about the ath based cards I've tried and not the PCI->Cardbus card as the later works just fine with various 802.11b cards (all wi) I have scattered about. If anyone can suggest a pci->cardbus adapter with a chipset that is known to work in 7.x? Thanks, MikeC From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 19:11:53 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7980E16A407 for ; Wed, 20 Feb 2008 19:11:53 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id 4877C13C4D9 for ; Wed, 20 Feb 2008 19:11:53 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [172.28.30.66] (westford-nat.juniper.net [66.129.232.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id 194461D1FC; Wed, 20 Feb 2008 14:11:52 -0500 (EST) Message-ID: <47BC7B3D.9020804@fid4.com> Date: Wed, 20 Feb 2008 14:10:53 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org References: <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> <47BC5788.3010706@errno.com> <20080220.094314.59709634.imp@bsdimp.com> In-Reply-To: <20080220.094314.59709634.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Benjamin.Close@clearchain.com Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 19:11:53 -0000 Warner Losh wrote: > There are two different bugs that I'm aware of. One is pci bus > numbering (which means that *NO* cardbus cards will work, but all > 16-bit "r2" cards will work). The other is the power issue that Sam > is talking about. But the first issue should be identical in both 6.x > and 7.0. > I'm guessing what I see is the first one. I have 4 cards (wi) that work: - Orinoco Silver - Orinoco Gold - Netgear (don't remember the model, - it's prisim 2.5 based and supports hostap) - EnGenius (2511CD PLUS EXT2) Those that don't (ath) in both 6.3 and 7.0 RC2: - Netgear WPN511 - Ubiquiti SRC Cardbus Card I'll test this one (ath) once it arrives: - CB9-GP-EXT 802.11a/b/g External Antenna Cardbus Card MikeC From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 19:21:05 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2784916A40A for ; Wed, 20 Feb 2008 19:21:05 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id E973513C469 for ; Wed, 20 Feb 2008 19:21:04 +0000 (UTC) (envelope-from sam@errno.com) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m1KJL2x8057398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 20 Feb 2008 11:21:02 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <47BC7D9D.3010707@errno.com> Date: Wed, 20 Feb 2008 11:21:01 -0800 From: Sam Leffler User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: "Michael C. Cambria" References: <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> <47BC5788.3010706@errno.com> <20080220.094314.59709634.imp@bsdimp.com> <47BC7B3D.9020804@fid4.com> In-Reply-To: <47BC7B3D.9020804@fid4.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Misty-Metrics: ebb.errno.com; whitelist Cc: freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 19:21:05 -0000 Michael C. Cambria wrote: > > Warner Losh wrote: > >> There are two different bugs that I'm aware of. One is pci bus >> numbering (which means that *NO* cardbus cards will work, but all >> 16-bit "r2" cards will work). The other is the power issue that Sam >> is talking about. But the first issue should be identical in both 6.x >> and 7.0. >> > I'm guessing what I see is the first one. > > I have 4 cards (wi) that work: > > - Orinoco Silver > - Orinoco Gold > - Netgear (don't remember the model, - it's prisim 2.5 based and > supports hostap) > - EnGenius (2511CD PLUS EXT2) > > Those that don't (ath) in both 6.3 and 7.0 RC2: > > - Netgear WPN511 > - Ubiquiti SRC Cardbus Card > > I'll test this one (ath) once it arrives: > > - CB9-GP-EXT 802.11a/b/g External Antenna Cardbus Card You chopped too much context so I cannot tell what you're referring too. I can only say that I have a T42 running HEAD that doesn't recognize an Atheros cardbus card I have. The same card works in another thinkpad w/ a different cardbus chip. The card works under other OS's on the T42 so it's a regression in HEAD (and likely 7.0). I traced through the code and think I pinned it down to not powering on the card on insert but am not certain. Sam From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 19:56:14 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1A8C16A405 for ; Wed, 20 Feb 2008 19:56:14 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id 8DF5C13C459 for ; Wed, 20 Feb 2008 19:56:14 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [172.28.30.66] (westford-nat.juniper.net [66.129.232.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id 971721CE6F; Wed, 20 Feb 2008 14:56:10 -0500 (EST) Message-ID: <47BC859F.6050603@fid4.com> Date: Wed, 20 Feb 2008 14:55:11 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Sam Leffler References: <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> <47BC5788.3010706@errno.com> <20080220.094314.59709634.imp@bsdimp.com> <47BC7B3D.9020804@fid4.com> <47BC7D9D.3010707@errno.com> In-Reply-To: <47BC7D9D.3010707@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 19:56:14 -0000 Sam Leffler wrote: > > You chopped too much context so I cannot tell what you're referring > too. I can only say that I have a T42 running HEAD that doesn't > recognize an Atheros cardbus card I have. The same card works in > another thinkpad w/ a different cardbus chip. The card works under > other OS's on the T42 so it's a regression in HEAD (and likely 7.0). > > I traced through the code and think I pinned it down to not powering > on the card on insert but am not certain. > > Sam As Warner said, I think there are two issues. To rule out pilot error, I now test with both the 6.3 and 7.0 from disk 1 of the install CD's. Both have ath compiled in. Booting from a laptop, ath is seen just fine. I use sysinstall to configure ath, enter a shell and play with ifconfig etc. When I boot on the system that has the pci->cardbus adapter, ath isn't detected at all. On this same system, my 802.11b (wi0) cards are detected just fine. MikeC From owner-freebsd-mobile@FreeBSD.ORG Wed Feb 20 20:23:59 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B43B616A401 for ; Wed, 20 Feb 2008 20:23:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 6D02913C465 for ; Wed, 20 Feb 2008 20:23:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m1KKKMSk073414; Wed, 20 Feb 2008 13:20:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 20 Feb 2008 13:20:22 -0700 (MST) Message-Id: <20080220.132022.74677477.imp@bsdimp.com> To: mcc@fid4.com From: Warner Losh In-Reply-To: <47BC859F.6050603@fid4.com> References: <47BC7B3D.9020804@fid4.com> <47BC7D9D.3010707@errno.com> <47BC859F.6050603@fid4.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Wed, 20 Feb 2008 20:23:59 -0000 > When I boot on the system that has the pci->cardbus adapter, ath isn't The pci->cardbus adapter with an ath card in it not working could be one of three things: (1) the pci bus numbering problem. (2) lack of 3.3 regulators on the card so only r2 cards can work (3) Sam's power issues I'm guessing #1 in this case. To tell if it is #1, you'll need to look to see if the subbus and such. sysctl dev.cbb will likely give me the next step in this debugging process. For my (working) laptop I see: dev.cbb.0.%parent: pci6 dev.cbb.0.domain: 0 dev.cbb.0.pribus: 6 dev.cbb.0.secbus: 7 dev.cbb.0.subbus: 7 but that's because the pribus, secbus and subbus are set right up the tree: dev.pci.6.%desc: ACPI PCI bus dev.pci.6.%driver: pci dev.pci.6.%parent: pcib3 dev.pcib.3.%desc: ACPI PCI-PCI bridge dev.pcib.3.%driver: pcib dev.pcib.3.%location: slot=20 function=4 handle=\_SB_.PCI0.P2P_ dev.pcib.3.%pnpinfo: vendor=0x1002 device=0x4371 subvendor=0x0000 subdevice=0x0000 class=0x060401 dev.pcib.3.%parent: pci0 hmmm, maybe I should add these debug diagnostics to pcib too. Warner From owner-freebsd-mobile@FreeBSD.ORG Thu Feb 21 02:22:54 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D76916A407 for ; Thu, 21 Feb 2008 02:22:54 +0000 (UTC) (envelope-from Benjamin.Close@clearchain.com) Received: from ipmail04.adl2.internode.on.net (ipmail04.adl2.internode.on.net [203.16.214.57]) by mx1.freebsd.org (Postfix) with ESMTP id BC5F213C442 for ; Thu, 21 Feb 2008 02:22:53 +0000 (UTC) (envelope-from Benjamin.Close@clearchain.com) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAGNuvEd5LYnr/2dsb2JhbACBWYpnpBM X-IronPort-AV: E=Sophos;i="4.25,382,1199626200"; d="scan'208";a="56811293" Received: from ppp121-45-137-235.lns11.adl6.internode.on.net (HELO mail.clearchain.com) ([121.45.137.235]) by ipmail04.adl2.internode.on.net with ESMTP; 21 Feb 2008 12:52:51 +1030 Received: from benjamin-closes-powerbook-g4-12.local (wcl.ml.unisa.edu.au [130.220.166.5]) (authenticated bits=0) by mail.clearchain.com (8.13.8/8.13.8) with ESMTP id m1L2MfOq083433 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Feb 2008 12:52:47 +1030 (CST) (envelope-from Benjamin.Close@clearchain.com) Message-ID: <47BCE187.5070805@clearchain.com> Date: Thu, 21 Feb 2008 12:57:19 +1030 From: Benjamin Close User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: "Michael C. Cambria" References: <47BA23DC.9050509@clearchain.com> <47BC32E0.3020307@fid4.com> <47BC5788.3010706@errno.com> <20080220.094314.59709634.imp@bsdimp.com> <47BC7B3D.9020804@fid4.com> In-Reply-To: <47BC7B3D.9020804@fid4.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.92.1, clamav-milter version 0.92.1 on pegasus.clearchain.com X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (mail.clearchain.com [192.168.154.1]); Thu, 21 Feb 2008 12:52:49 +1030 (CST) Cc: freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Thu, 21 Feb 2008 02:22:54 -0000 Michael C. Cambria wrote: > > Warner Losh wrote: > >> There are two different bugs that I'm aware of. One is pci bus >> numbering (which means that *NO* cardbus cards will work, but all >> 16-bit "r2" cards will work). The other is the power issue that Sam >> is talking about. But the first issue should be identical in both 6.x >> and 7.0. >> > I'm guessing what I see is the first one. > > I have 4 cards (wi) that work: > > - Orinoco Silver > - Orinoco Gold > - Netgear (don't remember the model, - it's prisim 2.5 based and > supports hostap) > - EnGenius (2511CD PLUS EXT2) > > Those that don't (ath) in both 6.3 and 7.0 RC2: > > - Netgear WPN511 > - Ubiquiti SRC Cardbus Card > > I'll test this one (ath) once it arrives: > > - CB9-GP-EXT 802.11a/b/g External Antenna Cardbus Card > > MikeC I know both the Orinico's are 16 bit cards, I'd suppect the netgear (prism based) card is as well. I've no idea on the EnGenius. Though if it's a 16bit card, it sounds like pcmcia devices work for you but true 32bit cardbus one's don't. If that's the trend I'd expect your new card not to work as well - certainly confirms it's bus related. Cheers, Benjamin From owner-freebsd-mobile@FreeBSD.ORG Thu Feb 21 06:32:08 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7E7F16A405 for ; Thu, 21 Feb 2008 06:32:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A0FC813C45B for ; Thu, 21 Feb 2008 06:32:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m1L6TfbY086445; Wed, 20 Feb 2008 23:29:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 20 Feb 2008 23:30:00 -0700 (MST) Message-Id: <20080220.233000.1021575865.imp@bsdimp.com> To: mcc@fid4.com From: "M. Warner Losh" In-Reply-To: <47BC859F.6050603@fid4.com> References: <47BC7B3D.9020804@fid4.com> <47BC7D9D.3010707@errno.com> <47BC859F.6050603@fid4.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mobile@freebsd.org Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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: Thu, 21 Feb 2008 06:32:08 -0000 In message: <47BC859F.6050603@fid4.com> "Michael C. Cambria" writes: : Sam Leffler wrote: : > : > You chopped too much context so I cannot tell what you're referring : > too. I can only say that I have a T42 running HEAD that doesn't : > recognize an Atheros cardbus card I have. The same card works in : > another thinkpad w/ a different cardbus chip. The card works under : > other OS's on the T42 so it's a regression in HEAD (and likely 7.0). : > : > I traced through the code and think I pinned it down to not powering : > on the card on insert but am not certain. : > : > Sam : : As Warner said, I think there are two issues. : : To rule out pilot error, I now test with both the 6.3 and 7.0 from disk : 1 of the install CD's. Both have ath compiled in. : : Booting from a laptop, ath is seen just fine. I use sysinstall to : configure ath, enter a shell and play with ifconfig etc. : : When I boot on the system that has the pci->cardbus adapter, ath isn't : detected at all. On this same system, my 802.11b (wi0) cards are : detected just fine. Please try this patch and send me the results of 'sysctl dev.pci' and 'sysctl dev.pcib' and 'sysctl dev.cbb'. There's 0 chance it will fix the problem, but will let us know for sure if this is my 'problem 1' or something else. This patch is against today's -current, but may apply, maybe with some fuzz, to earlier versions. Warner Index: pci_if.m =================================================================== RCS file: /cache/ncvs/src/sys/dev/pci/pci_if.m,v retrieving revision 1.12 diff -u -r1.12 pci_if.m --- pci_if.m 2 May 2007 17:50:35 -0000 1.12 +++ pci_if.m 10 May 2007 02:36:02 -0000 @@ -145,3 +145,10 @@ device_t dev; device_t child; } DEFAULT null_msi_count; + +METHOD int alloc_bus { + device_t dev; + device_t child; + int num; + int *bus; +}; Index: pci_pci.c =================================================================== RCS file: /cache/ncvs/src/sys/dev/pci/pci_pci.c,v retrieving revision 1.50 diff -u -r1.50 pci_pci.c --- pci_pci.c 30 Sep 2007 11:05:15 -0000 1.50 +++ pci_pci.c 21 Feb 2008 01:42:40 -0000 @@ -139,6 +139,8 @@ { struct pcib_softc *sc; uint8_t iolow; + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; sc = device_get_softc(dev); sc->dev = dev; @@ -153,6 +155,19 @@ sc->secstat = pci_read_config(dev, PCIR_SECSTAT_1, 2); sc->bridgectl = pci_read_config(dev, PCIR_BRIDGECTL_1, 2); sc->seclat = pci_read_config(dev, PCIR_SECLAT_1, 1); + sc->pribus = pcib_get_bus(device_get_parent(dev)); + + /*Sysctls*/ + sctx = device_get_sysctl_ctx(dev); + soid = device_get_sysctl_tree(dev); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "domain", + CTLFLAG_RD, &sc->domain, 0, "Domain number"); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "pribus", + CTLFLAG_RD, &sc->pribus, 0, "Primary bus number"); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "secbus", + CTLFLAG_RD, &sc->secbus, 0, "Secondary bus number"); + SYSCTL_ADD_UINT(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "subbus", + CTLFLAG_RD, &sc->subbus, 0, "Subordinate bus number"); /* * Determine current I/O decode. @@ -258,10 +273,11 @@ sc->flags |= PCIB_SUBTRACTIVE; if (bootverbose) { - device_printf(dev, " domain %d\n", sc->domain); - device_printf(dev, " secondary bus %d\n", sc->secbus); - device_printf(dev, " subordinate bus %d\n", sc->subbus); - device_printf(dev, " I/O decode 0x%x-0x%x\n", sc->iobase, sc->iolimit); + device_printf(dev, " domain %ld\n", (long)sc->domain); + device_printf(dev, " secondary bus %ld\n", (long)sc->secbus); + device_printf(dev, " subordinate bus %ld\n", (long)sc->subbus); + device_printf(dev, " I/O decode 0x%x-0x%x\n", sc->iobase, + sc->iolimit); if (pcib_is_nonprefetch_open(sc)) device_printf(dev, " memory decode 0x%jx-0x%jx\n", (uintmax_t)sc->membase, (uintmax_t)sc->memlimit); Index: pcib_private.h =================================================================== RCS file: /cache/ncvs/src/sys/dev/pci/pcib_private.h,v retrieving revision 1.13 diff -u -r1.13 pcib_private.h --- pcib_private.h 30 Sep 2007 11:05:15 -0000 1.13 +++ pcib_private.h 21 Feb 2008 01:41:23 -0000 @@ -48,9 +48,10 @@ #define PCIB_SUBTRACTIVE 0x1 #define PCIB_DISABLE_MSI 0x2 uint16_t command; /* command register */ - uint32_t domain; /* domain number */ - uint8_t secbus; /* secondary bus number */ - uint8_t subbus; /* subordinate bus number */ + u_long domain; /* domain number */ + u_long secbus; /* secondary bus number */ + u_long subbus; /* subordinate bus number */ + u_long pribus; /* primary bus number */ pci_addr_t pmembase; /* base address of prefetchable memory */ pci_addr_t pmemlimit; /* topmost address of prefetchable memory */ pci_addr_t membase; /* base address of memory window */ From owner-freebsd-mobile@FreeBSD.ORG Thu Feb 21 14:35:58 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F24A16A408 for ; Thu, 21 Feb 2008 14:35:58 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 6E61913C45A for ; Thu, 21 Feb 2008 14:35:57 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 21 Feb 2008 14:09:16 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp055) with SMTP; 21 Feb 2008 15:09:16 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX19QThs9W75QAgmSfq46EKw6pmjbfcOCubD0ifBVwH tB6gkXL9VW4AXl Message-ID: <47BD8606.90408@gmx.net> Date: Thu, 21 Feb 2008 15:09:10 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: DHCP fails after suspend/resume 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: Thu, 21 Feb 2008 14:35:58 -0000 hi I am having the problem, that after suspending and resuming, DHCP fails to get an address. The system is a ThinkPad T30 with an Atheros based mini-PCI wifi adapter and FreeBSD 6.3-RELEASE installed. The wireless network is configured to use WPA2 with EAP-TTLS authentication. The server side also runs FreeBSD 6.3-RELEASE using hostapd, freeradius and the ISC dhcp server. Manually doing an /etc/rc.d/netif stop ath0 followed by /etc/rc.d/netif start ath0 doesn't work either. When I reboot the ThinkPad, the machine gets an IP address instantaneously. Checking the logfiles on the server side, I can see, that the EAP negotiation after the resume works just fine. Also using ethereal I can see that the DHCP requests arrive on the server, and the server sends replies. But the client does not seem to receive or react to those replies. I am not in to DHCP that deep, but could this possibly be due to the server sending unicast replies instead of broadcast? Is the client supposed to do a DHCPRELEASE before going to sleep mode? Windows 2000, which runs in a dual-boot configuration on the ThinkPad can suspend/resume in the same setup without any problem, so I assume it's a client side problem. Any help would be appreciated. -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-mobile@FreeBSD.ORG Thu Feb 21 22:20:02 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1702816A400 for ; Thu, 21 Feb 2008 22:20:02 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id DB16B13C465 for ; Thu, 21 Feb 2008 22:20:01 +0000 (UTC) (envelope-from sam@errno.com) Received: from Macintosh-2.local ([10.0.0.196]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m1LMK1up067983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Feb 2008 14:20:01 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <47BDF911.5080002@errno.com> Date: Thu, 21 Feb 2008 14:20:01 -0800 From: Sam Leffler Organization: Errno Consulting User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Andreas Wetzel References: <47BD8606.90408@gmx.net> In-Reply-To: <47BD8606.90408@gmx.net> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: freebsd-mobile@freebsd.org Subject: Re: DHCP fails after suspend/resume 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: Thu, 21 Feb 2008 22:20:02 -0000 Andreas Wetzel wrote: > hi > > I am having the problem, that after suspending and resuming, DHCP fails > to get > an address. > > The system is a ThinkPad T30 with an Atheros based mini-PCI wifi adapter > and > FreeBSD 6.3-RELEASE installed. The wireless network is configured to use > WPA2 > with EAP-TTLS authentication. The server side also runs FreeBSD 6.3-RELEASE > using hostapd, freeradius and the ISC dhcp server. > > Manually doing an /etc/rc.d/netif stop ath0 followed by /etc/rc.d/netif > start > ath0 doesn't work either. When I reboot the ThinkPad, the machine gets > an IP > address instantaneously. > > Checking the logfiles on the server side, I can see, that the EAP > negotiation > after the resume works just fine. Also using ethereal I can see that the > DHCP > requests arrive on the server, and the server sends replies. But the client > does not seem to receive or react to those replies. I am not in to DHCP > that > deep, but could this possibly be due to the server sending unicast replies > instead of broadcast? Is the client supposed to do a DHCPRELEASE before > going > to sleep mode? > > Windows 2000, which runs in a dual-boot configuration on the ThinkPad can > suspend/resume in the same setup without any problem, so I assume it's a > client side problem. > > Any help would be appreciated. > Sounds like the h/w lost the crypto keys if you can see the DHCP frames as they should be encrypted. Unfortunately none of my Thinkpads have had working suspend/resume forever so it's hard for me to investigate. If you want to investigate turn on debug msgs in the 802.11 layer and the ath driver to watch what happens plumbing keys: wlandebug crypto athdebug key You'll need to build the driver with ATH_DEBUG enabled to get debug msgs. Sam From owner-freebsd-mobile@FreeBSD.ORG Thu Feb 21 23:01:42 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC4EE16A400 for ; Thu, 21 Feb 2008 23:01:42 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 41E1A13C45E for ; Thu, 21 Feb 2008 23:01:42 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 21 Feb 2008 23:01:40 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp022) with SMTP; 22 Feb 2008 00:01:40 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX1/zm7JLw9fzS9V0bjdsWvYDqwEFiZ3u2O/w+aJlms MFBU5BJV+e5Zd5 Message-ID: <47BE02D3.10300@gmx.net> Date: Fri, 22 Feb 2008 00:01:39 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: Sam Leffler References: <47BD8606.90408@gmx.net> <47BDF911.5080002@errno.com> In-Reply-To: <47BDF911.5080002@errno.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-mobile@freebsd.org Subject: Re: DHCP fails after suspend/resume 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: Thu, 21 Feb 2008 23:01:43 -0000 Sam Leffler wrote: > Sounds like the h/w lost the crypto keys if you can see the DHCP frames > as they should be encrypted. Unfortunately none of my Thinkpads have > had working suspend/resume forever so it's hard for me to investigate. > If you want to investigate turn on debug msgs in the 802.11 layer and > the ath driver to watch what happens plumbing keys: > > wlandebug crypto > athdebug key > > You'll need to build the driver with ATH_DEBUG enabled to get debug msgs. I forgot to mention, that currently I am doing an /etc/rc.d/netif stop from the /etc/rc.suspend script, and an /etc/rc.d/netif start from the /etc/rc.resume script. Otherwise, after the resume, I end up having multiple instances of dhclient running on ath0. This implies restarting wpa_supplicant and dhclient. Am I wrong or does this set up completely new encryption keys? The radius server log shows a successful EAP-TTLS login after the resume, and ath0 on the ThinkPad shows that is has associated to the network. A little hacking of the dhclient source has discovered, that when I set the BOOTP Broadcast flag in the DHCPREQUEST packet, dhclient succeeds in getting an address from the DHCP server. But then another problem pops up. ARP does not seem to function. So maybe you are right about problems with the encryption keys. What I do not quite understand is, why should I see encrypted traffic, when running ethereal on ath0 on the server machine running hostapd? -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 09:58:24 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 182EE16A401 for ; Fri, 22 Feb 2008 09:58:24 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 6CDB213C468 for ; Fri, 22 Feb 2008 09:58:23 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 22 Feb 2008 09:58:21 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp009) with SMTP; 22 Feb 2008 10:58:21 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX18suINxgMUsZNB5NCXn1uhQ+ZSXVRVlW40Gtwu4lh TuTU4/7PdhpFD0 Message-ID: <47BE9CBC.6010500@gmx.net> Date: Fri, 22 Feb 2008 10:58:20 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 09:58:24 -0000 hi I cannot seem to get CardBus cards working with my ThinkPad 600 running 6.3-RELEASE. An old 16bit/5V orinoco card works fine. Turning on various cardbus/cbb debug options in /boot/loader.conf reveals the following messages during boot: cbb1: mem 0x20300000-0x20300fff at device 2.1 on pci 0 cbb1: Found memory at 20300000 cbb1: Secondary bus is 4 cardbus1: on cbb1 pccard1: <16-bit PCCard bus> on cbb1 cbb1: card inserted: event=0x00000000, state=30000920 cbb1: cbb_power: 3V cbb1: cbb_power: 0V I know there has been some talk about this on the lists some years ago. Some suggested manually setting various hw.pci.link.LNK?.irq options in /boot/loader.conf. Others said it had something to do with PCI bus numbering and subordinate numbers. I tried tweaking the /boot/loader.conf to no avail, but never found a working solution to this problem. Is there anything I can do to help get this fixed? -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 11:25:33 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5442B16A401 for ; Fri, 22 Feb 2008 11:25:33 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id A807213C4D5 for ; Fri, 22 Feb 2008 11:25:32 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 22 Feb 2008 11:25:30 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp055) with SMTP; 22 Feb 2008 12:25:30 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX1906IBqkUJ07O/lMH5Uiz44V+aFVCMFk1XkPuCmmB f/IQblHYJsz1rL Message-ID: <47BEB12A.3090509@gmx.net> Date: Fri, 22 Feb 2008 12:25:30 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: Ruslan Ermilov References: <47BE9CBC.6010500@gmx.net> <20080222105025.GB94607@team.vega.ru> In-Reply-To: <20080222105025.GB94607@team.vega.ru> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 11:25:33 -0000 Ruslan Ermilov wrote: > I have ThinkPad 600X. Try setting hw.cbb.start_memory=0xd8000 > in /boot/loader.conf. I no longer have to use hw.pci.link.*.irq > hacks. Other than continuing regressions with ACPI suspend, it > feels good under -CURRENT for almost eight years now. ;) Lucky you. I have tried setting hw.cbb.start_memory=0xd8000, but it does not seem to make any difference. I guess there are subtle differences between the ThinkPad 600 and 600X. I already spent hours of googling to find a solution to this problem, but all I could find out, is that other OSes like Linux or NetBSD have had similar problems on this hardware. Not sure if they managed to fix it though. Surprisingly Windows has no problem with that machine, even running with ACPI HAL at all, apart from being *slow* :) -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 11:31:15 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C526C16A403 for ; Fri, 22 Feb 2008 11:31:15 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id 84AF513C465 for ; Fri, 22 Feb 2008 11:31:14 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from [87.242.97.68] (port=61776 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1JSVU2-00005O-HH; Fri, 22 Feb 2008 10:50:26 +0000 Received: from edoofus.dev.vega.ru (localhost [127.0.0.1]) by edoofus.dev.vega.ru (8.14.2/8.14.2) with ESMTP id m1MAoP9a094955; Fri, 22 Feb 2008 13:50:25 +0300 (MSK) (envelope-from rermilov@team.vega.ru) Received: (from ru@localhost) by edoofus.dev.vega.ru (8.14.2/8.14.2/Submit) id m1MAoP66094954; Fri, 22 Feb 2008 13:50:25 +0300 (MSK) (envelope-from rermilov@team.vega.ru) X-Authentication-Warning: edoofus.dev.vega.ru: ru set sender to rermilov@team.vega.ru using -f Date: Fri, 22 Feb 2008 13:50:25 +0300 From: Ruslan Ermilov To: Andreas Wetzel Message-ID: <20080222105025.GB94607@team.vega.ru> References: <47BE9CBC.6010500@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47BE9CBC.6010500@gmx.net> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 11:31:15 -0000 On Fri, Feb 22, 2008 at 10:58:20AM +0100, Andreas Wetzel wrote: > hi > > I cannot seem to get CardBus cards working with my ThinkPad 600 running > 6.3-RELEASE. An old 16bit/5V orinoco card works fine. Turning on various > cardbus/cbb debug options in /boot/loader.conf reveals the following > messages during boot: > > cbb1: mem 0x20300000-0x20300fff at device 2.1 on pci 0 > cbb1: Found memory at 20300000 > cbb1: Secondary bus is 4 > cardbus1: on cbb1 > pccard1: <16-bit PCCard bus> on cbb1 > cbb1: card inserted: event=0x00000000, state=30000920 > cbb1: cbb_power: 3V > cbb1: cbb_power: 0V > > I know there has been some talk about this on the lists some years ago. > Some suggested manually setting various hw.pci.link.LNK?.irq options in > /boot/loader.conf. Others said it had something to do with PCI bus numbering > and subordinate numbers. I tried tweaking the /boot/loader.conf to no avail, > but never found a working solution to this problem. Is there anything I can > do to help get this fixed? > I have ThinkPad 600X. Try setting hw.cbb.start_memory=0xd8000 in /boot/loader.conf. I no longer have to use hw.pci.link.*.irq hacks. Other than continuing regressions with ACPI suspend, it feels good under -CURRENT for almost eight years now. ;) Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 12:46:00 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3239616A404 for ; Fri, 22 Feb 2008 12:46:00 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: from fnord.ir.bbn.com (fnord.ir.bbn.com [192.1.100.210]) by mx1.freebsd.org (Postfix) with ESMTP id E9E6C13C455 for ; Fri, 22 Feb 2008 12:45:59 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id B624B52EA; Fri, 22 Feb 2008 07:26:44 -0500 (EST) From: Greg Troxel To: Andreas Wetzel References: <47BE9CBC.6010500@gmx.net> X-Hashcash: 1:20:080222:freebsd-mobile@freebsd.org::PviTvHQiGzBWTy8g:000000000000000000000000000000000007KXQ X-Hashcash: 1:20:080222:mickey242@gmx.net::PviTvHQiGzBWTy8g:0000000000000000000000000000000000000000000065oA Date: Fri, 22 Feb 2008 07:26:44 -0500 In-Reply-To: <47BE9CBC.6010500@gmx.net> (Andreas Wetzel's message of "Fri, 22 Feb 2008 10:58:20 +0100") Message-ID: User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 12:46:00 -0000 I have dealt with this on NetBSD, and am posting here in the hope my experiences are helpful. Thinkpad 600 (2645-41U) and 600E (2645-4AU) have different and seemingly indepdenent cbb problems, and it seems 600X might be like 600E. This is all from memory, so take with a grain of salt. 600: had uninitialized irq for cbb (-1). pcic would attach ok if cbb not in kernel. With PCI_INTR_FIXUP, this would get whacked to 11 and then it works. I'm typing this with packets being routed through a 600 with two cbb ethernets (NetBSD 4 GENERIC_LAPTOP). 600E: If one mapped cardbus space at 1 GB, cardbus cards wouldn't work. Mapping at 0.5 GB worked. Ruslan recommended hw.cbb.start_memory=0xd8000, which is also below 1 GB and very likely above physical memory (my 600 has 96 and 600E 192). So, I suspect you have an IRQ routing problem, not a memory space problem, unless you were speaking loosely about a "600". >From NetBSD's pci(4): PCI_INTR_FIXUP Fixup PCI interrupt routing via PCIBIOS or ACPI. Some i386 and amd64 BIOS implementations don't assign an interrupt for some devices. This option assigns an interrupt for such devices instead of relying upon the BIOS to do so. If a valid interrupt has already been assigned to a device, this option leaves the interrupt as is. >From NetBSD's cardbus(4): Memory space conflicts NetBSD maps memory on Cardbus and PCMCIA cards in order to access the cards (including reading CIS tuples on PCMCIA cards) and access the devices using the RBUS abstraction. When the mapping does not work, PCM- CIA cards are typically ignored on insert, and Cardbus cards are recog- nized but nonfunctional. On i386, the kernel has a heuristic to choose a memory address for mapping, defaulting to 1 GB, but choosing 0.5 GB on machines with less than 192 MB RAM and 2 GB on machines with more than 1 GB of RAM. The intent is to use an address that is larger than available RAM, but low enough to work; some systems seem to have trouble with addresses requiring more than 20 address lines. On i386, the following kernel configuration line disables the heuristics and forces Cardbus mem- ory space to be mapped at 512M; this value makes Cardbus support (includ- ing PCMCIA attachment under a cbb) work on some notebook models, includ- ing the IBM Thinkpad 600E (2645-4AU) and the Compaq ARMADA M700: options RBUS_MIN_START="0x20000000" From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 13:56:57 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF48516A403 for ; Fri, 22 Feb 2008 13:56:57 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 5640513C4EE for ; Fri, 22 Feb 2008 13:56:57 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 22 Feb 2008 13:56:55 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp031) with SMTP; 22 Feb 2008 14:56:55 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX1+m7lIT8iWm2uVCyIGaLoRaVh2fXn0eQi4fhjTkV9 kXrpSCjKDS6rRc Message-ID: <47BED4A6.7040501@gmx.net> Date: Fri, 22 Feb 2008 14:56:54 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: Greg Troxel References: <47BE9CBC.6010500@gmx.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 13:56:58 -0000 Greg Troxel wrote: > I have dealt with this on NetBSD, and am posting here in the hope my > experiences are helpful. Thinkpad 600 (2645-41U) and 600E (2645-4AU) > have different and seemingly indepdenent cbb problems, and it seems 600X > might be like 600E. This is all from memory, so take with a grain of > salt. > > 600: had uninitialized irq for cbb (-1). pcic would attach ok if cbb > not in kernel. With PCI_INTR_FIXUP, this would get whacked to 11 and > then it works. I'm typing this with packets being routed through a 600 > with two cbb ethernets (NetBSD 4 GENERIC_LAPTOP). > > 600E: If one mapped cardbus space at 1 GB, cardbus cards wouldn't work. > Mapping at 0.5 GB worked. > > Ruslan recommended hw.cbb.start_memory=0xd8000, which is also below 1 GB > and very likely above physical memory (my 600 has 96 and 600E 192). > > So, I suspect you have an IRQ routing problem, not a memory space > problem, unless you were speaking loosely about a "600". My ThinkPad 600 is a model 2645-450 with a total of 288 MB RAM installed (2 * 128MB + 32 MB internal memory). I know the 600 has several IRQ related issues and BIOS IRQ settings can only be modified by means of the DOS PS2 program, which I already used to disable all unnecessary devices so that IRQs 7, 10 and 11 are exclusively available to PCI devices. When booting in verbose mode, this is also what the FreeBSD kernel tells me. I have seen postings of others who had IRQ related error messages from the kernel, that cbb could not map an IRQ, but I do not get these. Possibly because I have been playing around with the hw.pci.link.*.irq options in /boot/loader.conf for quite some time now. A while ago I found some info mentioning a possible bug in the ACPI DSDT of the 600's here: http://bugzilla.kernel.org/show_bug.cgi?id=5966 So I dumped a disassembly of the ACPI DSDT of my 600 and found the exact same code fragment in it, changed it according to the info above, and tried booting with the modified DSDT. Unfortunately this did not make any difference either. One interesting thing is, that with FreeBSD 6.2, the card used to function every once in a while, for no apparent reason. To that time the only tunables I have been using were: hw.pci.link.LNKA.irq=11 hw.pci.link.LNKB.irq=10 hw.pci.link.LNKC.irq=7 hw.pci-link.LNKD.irq=7 But since I put FreeBSD 6.3 on the machine, I wasn't able to reproduce that behaviour, even if I would boot the machine 50 times in a row. -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 15:04:14 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CE716A400 for ; Fri, 22 Feb 2008 15:04:14 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: from fnord.ir.bbn.com (fnord.ir.bbn.com [192.1.100.210]) by mx1.freebsd.org (Postfix) with ESMTP id 3494413C4EC for ; Fri, 22 Feb 2008 15:04:13 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id DD15A52EA; Fri, 22 Feb 2008 10:04:12 -0500 (EST) X-Hashcash: 1:20:080222:freebsd-mobile@freebsd.org::/cZszzTGBGi5V1E/:000000000000000000000000000000000001KvG From: Greg Troxel To: Andreas Wetzel References: <47BE9CBC.6010500@gmx.net> <47BED4A6.7040501@gmx.net> X-Hashcash: 1:20:080222:mickey242@gmx.net::2gVoaRwVutjmb09I:000000000000000000000000000000000000000000000LO4 Date: Fri, 22 Feb 2008 10:04:12 -0500 In-Reply-To: <47BED4A6.7040501@gmx.net> (Andreas Wetzel's message of "Fri, 22 Feb 2008 14:56:54 +0100") Message-ID: User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 15:04:14 -0000 hw.pci.link.LNKA.irq=11 hw.pci.link.LNKB.irq=10 hw.pci.link.LNKC.irq=7 hw.pci-link.LNKD.irq=7 That looks more or less like the equivalent of NetBSD's PCI_INTR_FIXUP. My ThinkPad 600 is a model 2645-450 with a total of 288 MB RAM installed (2 * 128MB + 32 MB internal memory). I know the 600 has several IRQ related I've never see a -450, but probably it has the same motherboard as a 41U. I would suggest enabling the highest level of verbosity possible for irq/pcibios stuff. You might try booting netbsd 4 or current to see if that works, and if so enabled high verbosity and figure out what it's doing and then spiff up freebsd to have the same workaround. I'm sure there are many things in netbsd that have been fixed via the reverse path - I'm not claiming 'x is better', but more that each probably has hardware workarounds the other doesn't and cross-porting them is a good thing. From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 16:23:46 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B32C16A404 for ; Fri, 22 Feb 2008 16:23:46 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from mail102.csoft.net (mail102.csoft.net [205.205.219.4]) by mx1.freebsd.org (Postfix) with ESMTP id 2C17013C45D for ; Fri, 22 Feb 2008 16:23:46 +0000 (UTC) (envelope-from mcc@fid4.com) Received: from [172.28.8.126] (westford-nat.juniper.net [66.129.232.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail102.csoft.net (Postfix) with ESMTP id B9F3A1D512; Fri, 22 Feb 2008 11:21:40 -0500 (EST) Message-ID: <47BEF621.8010109@fid4.com> Date: Fri, 22 Feb 2008 11:19:45 -0500 From: "Michael C. Cambria" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: "M. Warner Losh" , freebsd-mobile@freebsd.org References: <47BC7B3D.9020804@fid4.com> <47BC7D9D.3010707@errno.com> <47BC859F.6050603@fid4.com> <20080220.233000.1021575865.imp@bsdimp.com> In-Reply-To: <20080220.233000.1021575865.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: FreeBSD 7 doesn't see AR5212 (Netgear WPN511) via PCI/Cardbus Adapter 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, 22 Feb 2008 16:23:46 -0000 M. Warner Losh wrote: > Please try this patch and send me the results of 'sysctl dev.pci' and > 'sysctl dev.pcib' and 'sysctl dev.cbb'. There's 0 chance it will fix > the problem, but will let us know for sure if this is my 'problem 1' > or something else. > Here are the results: $ sysctl dev.pci dev.pci.0.%desc: ACPI PCI bus dev.pci.0.%driver: pci dev.pci.0.%parent: pcib0 dev.pci.0.wake: 0 dev.pci.1.%desc: ACPI PCI bus dev.pci.1.%driver: pci dev.pci.1.%parent: pcib1 dev.pci.1.wake: 0 $ sysctl dev.pcib dev.pcib.0.%desc: ACPI Host-PCI bridge dev.pcib.0.%driver: pcib dev.pcib.0.%location: handle=\_SB_.PCI0 dev.pcib.0.%pnpinfo: _HID=PNP0A03 _UID=4 dev.pcib.0.%parent: acpi0 dev.pcib.0.wake: 0 dev.pcib.1.%desc: ACPI PCI-PCI bridge dev.pcib.1.%driver: pcib dev.pcib.1.%location: slot=30 function=0 handle=\_SB_.PCI0.PCI1 dev.pcib.1.%pnpinfo: vendor=0x8086 device=0x244e subvendor=0x0000 subdevice=0x0000 class=0x060400 dev.pcib.1.%parent: pci0 dev.pcib.1.domain: 0 dev.pcib.1.pribus: 0 dev.pcib.1.secbus: 1 dev.pcib.1.subbus: 1 dev.pcib.1.wake: 0 $ sysctl dev.cbb dev.cbb.0.%desc: TI1410 PCI-CardBus Bridge dev.cbb.0.%driver: cbb dev.cbb.0.%location: slot=8 function=0 dev.cbb.0.%pnpinfo: vendor=0x104c device=0xac50 subvendor=0x133f subdevice=0x3000 class=0x060700 dev.cbb.0.%parent: pci1 dev.cbb.0.domain: 0 dev.cbb.0.pribus: 1 dev.cbb.0.secbus: 2 dev.cbb.0.subbus: 3 Thanks, MikeC From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 17:19:11 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1500216A46B for ; Fri, 22 Feb 2008 17:19:11 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 67C6D13C45B for ; Fri, 22 Feb 2008 17:19:10 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 22 Feb 2008 17:19:08 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp049) with SMTP; 22 Feb 2008 18:19:08 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX1/m7YRNW9TmoaO3NoD0aYOsfG/WGYViuynatKoZe9 XIp8ecviRrkEZf Message-ID: <47BF040B.6070900@gmx.net> Date: Fri, 22 Feb 2008 18:19:07 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: Greg Troxel References: <47BE9CBC.6010500@gmx.net> <47BED4A6.7040501@gmx.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 17:19:11 -0000 Greg Troxel wrote: > You might try booting netbsd 4 or current to see if that works, and if > so enabled high verbosity and figure out what it's doing and then spiff > up freebsd to have the same workaround. I'm sure there are many things > in netbsd that have been fixed via the reverse path - I'm not claiming > 'x is better', but more that each probably has hardware workarounds the > other doesn't and cross-porting them is a good thing. I just tried booting off a fresh NetBSD 4.0 i386 CD. The result looks to me as if the card is recognized, but the stock kernel does not have a driver to attach to it. Here are the related parts from NetBSDs dmesg output with verbosity enabled, as there is currently no easy way to get the whole dmesg output from the ThinkPad to a networked machine... LNKB: Picked IRQ 9 with weight 0 cbb1: interrupting at irq 9 cbb1: cacheline 0x8 lattimer 0xb0 cbb1: bhlc 0x82a808 lscp 0xb0060400 cardslot1 at cbb1 slot 1 flags 0 cardbus1 at cardslot1: bus 4 cacheline 0x8, lattimer 0xb0 pcmcia1 at cardslot1 [...] Atheros Communications, Inc., AR5001-0000-0000, Wireless LAN Reference Card, 00 (manufacturer 0x271, product 0x12) vendor 0x168c product 0x0013 (ethernet network, revision 0x01) at cardbus1 function 0 not configured -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From owner-freebsd-mobile@FreeBSD.ORG Fri Feb 22 17:43:21 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB8BB16A402 for ; Fri, 22 Feb 2008 17:43:21 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: from fnord.ir.bbn.com (fnord.ir.bbn.com [192.1.100.210]) by mx1.freebsd.org (Postfix) with ESMTP id 5952A13C469 for ; Fri, 22 Feb 2008 17:43:20 +0000 (UTC) (envelope-from gdt@ir.bbn.com) Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id DADAF52EC; Fri, 22 Feb 2008 12:43:19 -0500 (EST) From: Greg Troxel To: Andreas Wetzel References: <47BE9CBC.6010500@gmx.net> <47BED4A6.7040501@gmx.net> <47BF040B.6070900@gmx.net> X-Hashcash: 1:20:080222:mickey242@gmx.net::qyniKGPqZP2bFym6:000000000000000000000000000000000000000000000c+M X-Hashcash: 1:20:080222:freebsd-mobile@freebsd.org::RrEMvbdkXk6zDpAD:00000000000000000000000000000000000202V Date: Fri, 22 Feb 2008 12:43:19 -0500 In-Reply-To: <47BF040B.6070900@gmx.net> (Andreas Wetzel's message of "Fri, 22 Feb 2008 18:19:07 +0100") Message-ID: User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-mobile@freebsd.org Subject: Re: ThinkPad 600 - CardBus inoperative 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, 22 Feb 2008 17:43:21 -0000 I just tried booting off a fresh NetBSD 4.0 i386 CD. The result looks to me as if the card is recognized, but the stock kernel does not have a driver to attach to it. Yes, it looks that way to me too - it read the config registers and didn't find a match. I am trying to remember the failure mode - I don't remember if it was failure to notice that a card was inserted, or that interrupts didn't work so the card would never receive packets and get transmit timeouts. Atheros Communications, Inc., AR5001-0000-0000, Wireless LAN Reference Card, 00 (manufacturer 0x271, product 0x12) vendor 0x168c product 0x0013 (ethernet network, revision 0x01) at cardbus1 function 0 not configured Vendor 0x168c Product 0x0013 is in my netbsd-4 sources, but coded as AR5212. 0x271 and 0x12 look odd and I don't find the vendor code in pcidevs. I bet this is almost identical in freebsd, but here it is: /* Atheros Communications products */ product ATHEROS AR5201 0x0007 AR5201 Wireless LAN product ATHEROS AR5311 0x0011 AR5211 Wireless LAN product ATHEROS AR5211 0x0012 AR5211 Wireless LAN product ATHEROS AR5212 0x0013 AR5212 Wireless LAN product ATHEROS AR5201_AP 0x0207 AR5201 Wireless LAN Reference Card (Early AP11) product ATHEROS AR5201_DEFAULT 0x1107 AR5201 Wireless LAN (no eeprom) product ATHEROS AR5212_DEFAULT 0x1113 AR5212 Wireless LAN (no eeprom) product ATHEROS AR5211_DEFAULT 0x1112 AR5211 Wireless LAN (no eeprom) product ATHEROS AR5212_FPGA 0xf013 AR5212 Wireless LAN Reference Card (emulation board) product ATHEROS AR5211_FPGA11B 0xf11b AR5211 Wireless LAN Reference Card (11b emulation board) product ATHEROS AR5211_LEGACY 0xff12 AR5211 Wireless LAN Reference Card (original emulation board) From owner-freebsd-mobile@FreeBSD.ORG Sat Feb 23 20:39:38 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EB7416A401 for ; Sat, 23 Feb 2008 20:39:38 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id E8BEA13C46B for ; Sat, 23 Feb 2008 20:39:37 +0000 (UTC) (envelope-from mickey242@gmx.net) Received: (qmail invoked by alias); 23 Feb 2008 20:39:35 -0000 Received: from port-ip-213-211-209-123.reverse.mdcc-fun.de (EHLO gunhead.enforcer.cc) [213.211.209.123] by mail.gmx.net (mp029) with SMTP; 23 Feb 2008 21:39:35 +0100 X-Authenticated: #8913523 X-Provags-ID: V01U2FsdGVkX19f5TNMUv9f+YwnZ2BNoxre1nhWVJvZ07BSPdIstk ocxvy1/Akb/CFs Message-ID: <47C08482.4050608@gmx.net> Date: Sat, 23 Feb 2008 21:39:30 +0100 From: Andreas Wetzel User-Agent: Thunderbird 2.0.0.9 (X11/20080216) MIME-Version: 1.0 To: freebsd-mobile@freebsd.org References: <47BE9CBC.6010500@gmx.net> <47BED4A6.7040501@gmx.net> In-Reply-To: <47BED4A6.7040501@gmx.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: ThinkPad 600 - CardBus inoperative 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: Sat, 23 Feb 2008 20:39:38 -0000 It seems like I have found a workaround for my ThinkPad 600 cardbus problem. (I wouldn't call it a fix). Here is what I did: --- /usr/src/sys/dev/cardbus/cardbus.c.orig 2008-02-23 20:44:08.000000000 +0100 +++ /usr/src/sys/dev/cardbus/cardbus.c 2008-02-23 20:40:07.000000000 +0100 @@ -460,6 +460,7 @@ device_t child; int cardattached = 0; int bus, slot, func; + int try; cardbus_detach_card(cbdev); /* detach existing cards */ POWER_ENABLE_SOCKET(brdev, cbdev); @@ -470,9 +471,17 @@ for (func = 0; func <= cardbusfunchigh; func++) { struct cardbus_devinfo *dinfo; - dinfo = (struct cardbus_devinfo *) - pci_read_device(brdev, bus, slot, func, - sizeof(struct cardbus_devinfo)); + for(try = 1, dinfo = NULL; !dinfo && try <= 3; try++) + { + dinfo = (struct cardbus_devinfo *) + pci_read_device(brdev, bus, slot, func, + sizeof(struct cardbus_devinfo)); + + printf("cardbus_attach_card(): %d:%d:%d try %d %s\n", + bus, slot, func, try, + dinfo == NULL ? "FAILED" : "SUCCEEDED"); + } + if (dinfo == NULL) continue; if (dinfo->pci.cfg.mfdev) This small patch simply retries up to three times the read during card attach. The first try fails, and returns NULL. But the second try succeeds, the card gets initialized and is working properly. Perhaps someone with more in-depth knowledge of the pci/cardbus stuff has an explanation, why that is happening. As has been confirmed by others, the ThinkPad 600 also has some interrupt routing issues. As far as I can tell, these can either be fixed by putting some hw.pci.link.LNK?.irq tunables into /boot/loader.conf, or by using a fixed ACPI DSDT. Both methods work for me, but the card not being initialized due to the first read returning NULL, seems to be a different problem. Possibly sort of timing problem??? /boot/loader.conf: #acpi_dsdt_load="YES" #acpi_dsdt_name="/boot/TP600.aml" cpufreq_load="YES" hw.cardbus.debug="1" hw.cardbus.cis_debug="1" hw.cbb.debug="1" #hw.acpi.verbose="1" #hw.cbb.start_memory=0xd8000 hw.pci.link.LNKA.irq="11" hw.pci.link.LNKB.irq="10" hw.pci.link.LNKC.irq="7" hw.pci.link.LNKD.irq="7" dmesg output: Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 6.3-RELEASE #11: Sat Feb 23 20:45:46 CET 2008 root@escape.enforcer.cc:/usr/obj/usr/src/sys/ESCAPE Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Pentium II/Pentium II Xeon/Celeron (298.42-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x652 Stepping = 2 Features=0x183f9ff real memory = 301793280 (287 MB) avail memory = 285884416 (272 MB) ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0xef08-0xef0b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 acpi_lid0: on acpi0 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 cbb0: mem 0x20301000-0x20301fff at device 2.0 on pci0 cbb0: Found memory at 20301000 cbb0: Secondary bus is 1 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 cbb1: mem 0x20300000-0x20300fff at device 2.1 on pci0 cbb1: Found memory at 20300000 cbb1: Secondary bus is 4 cardbus1: on cbb1 pccard1: <16-bit PCCard bus> on cbb1 pci0: at device 3.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfcf0-0xfcff at device 7.1 on pci0 ata0: on atapci0 ata1: on atapci0 uhci0: port 0x8400-0x841f irq 7 at device 7.2 on pci0 uhci0: [GIANT-LOCKED] usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered intpm0: port 0xefa0-0xefaf irq 9 at device 7.3 on pci0 intpm0: I/O mapped efa0 intpm0: intr IRQ 9 enabled revision 0 intpm0: [GIANT-LOCKED] intsmb0: on intpm0 smbus1: on intsmb0 smb0: on smbus1 intpm0: PM I/O mapped ef00 acpi_tz0: on acpi0 acpi_tz1: on acpi0 acpi_tz2: on acpi0 fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: port 0x2f8-0x2ff irq 3 drq 3 on acpi0 sio1: type 16550A speaker0: port 0x61 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 Generic PS/2 mouse, device ID 0 battery0: on acpi0 acpi_acad0: on acpi0 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xc9fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <12 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 298423427 Hz quality 800 Timecounters tick every 1.000 msec ipfw2 initialized, divert enabled, rule-based forwarding disabled, default to deny, logging unlimited Status is 0x30000106 Status is 0x30000920 cbb1: card inserted: event=0x00000000, state=30000920 cbb1: cbb_power: 3V cardbus_attach_card(): 4:0:0 try 1 FAILED cardbus_attach_card(): 4:0:0 try 2 SUCCEEDED TUPLE: LINKTARGET [3]: 43 49 53 Manufacturer ID: 71021200 TUPLE: Unknown(0x04) [6]: 03 01 00 00 00 00 TUPLE: Unknown(0x05) [14]: 41 b1 39 b5 1e 2d 4e 56 30 ff ff 02 e9 00 cardbus1: Opening BAR: type=MEM, bar=10, len=10000 CIS reading done cardbus1: Non-prefetchable memory at 88000000-8800ffff ath0: mem 0x88000000-0x8800ffff irq 10 at device 0.0 on cardbus1 ath0: Ethernet address: 00:19:e0:83:b0:41 ath0: mac 7.9 phy 4.5 radio 5.6 ad0: 4887MB at ata0-master UDMA33 Trying to mount root from ufs:/dev/ad0s2a -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming.