From owner-freebsd-mobile@FreeBSD.ORG Tue Jan 13 10:52:48 2004 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3CFB316A4CE for ; Tue, 13 Jan 2004 10:52:48 -0800 (PST) Received: from wolfe.bbn.com (wolfe.bbn.com [128.89.80.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF82E43D3F for ; Tue, 13 Jan 2004 10:52:31 -0800 (PST) (envelope-from gdt@bbn.com) Received: from wolfe.bbn.com (localhost [127.0.0.1]) by wolfe.bbn.com (Postfix) with ESMTP id 22FBC2051D; Tue, 13 Jan 2004 13:52:31 -0500 (EST) To: Rui Li References: <20040112070640.87077.qmail@web40808.mail.yahoo.com> From: Greg Troxel In-Reply-To: <20040112070640.87077.qmail@web40808.mail.yahoo.com> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 13 Jan 2004 13:52:31 -0500 Sender: gdt@bbn.com Message-Id: <20040113185231.22FBC2051D@wolfe.bbn.com> cc: freebsd-mobile@freebsd.org Subject: Re: PCCARD unrecogonized by FreeBSD 5.1-RELEASE on IBM Thinkpad 600 X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2004 18:52:48 -0000 You have mangled the dmesg output by linewrapping it. Please try to avoid this. I have a 600 (2645-41U), and run NetBSD on it, but I think my NetBSD experience will be helpful. The key point is that the irq for the cbb was unconfigured, and the kernel patched it to 11, and then everything was fine. If I don't try to use the cbb, and let the kernel probe the pcmcia controller in ISA mode, all works fine (with 16-bit cards). Probing cbb, I get a problem with "unconfigured IRQ". Turning on various PCIBIOS options (in NetBSD), I found that the IRQ in the PIR was set to -1, which means that the BIOS failed to configure the device properly. I set a PCIBIOS_FIXUP_INTR option (actually many): options PCIBIOS # PCI BIOS support options PCIBIOSVERBOSE # PCI BIOS verbose info options PCIBIOS_ADDR_FIXUP # fixup PCI I/O addresses options PCIBIOS_BUS_FIXUP # fixup PCI bus numbering options PCIBIOS_INTR_FIXUP # fixup PCI interrupt routing options PCIBIOS_IRQS_HINT=0x0a00 # PCI interrupts hint. IRQ 9 or 11 options PCIBIOS_INTR_GUESS # see pcibios(4) The kernel then patched the irq: BIOS32 rev. 0 found at 0xfd820 PCI BIOS rev. 2.1 found at 0xfd880 pcibios: config mechanism [1][x], special cycles [1][x], last bus 6 PCI IRQ Routing Table rev. 1.0 found at 0xf9e10, size 96 bytes (4 entries) PCI Interrupt Router at 000:07:0 PCI Exclusive IRQs: 11 PIR Entry 0: Bus: 0 Device: 7 INTA: link 0x60 bitmap 0xdef8 INTB: link 0x00 bitmap 0x0000 INTC: link 0x00 bitmap 0x0000 INTD: link 0x63 bitmap 0xdef8 PIR Entry 1: Bus: 0 Device: 2 INTA: link 0x60 bitmap 0xdef8 INTB: link 0x61 bitmap 0xdef8 INTC: link 0x00 bitmap 0x0000 INTD: link 0x00 bitmap 0x0000 PIR Entry 2: Bus: 0 Device: 3 INTA: link 0x60 bitmap 0xdef8 INTB: link 0x00 bitmap 0x0000 INTC: link 0x00 bitmap 0x0000 INTD: link 0x00 bitmap 0x0000 PIR Entry 3: Bus: 0 Device: 4 INTA: link 0x60 bitmap 0xdef8 INTB: link 0x61 bitmap 0xdef8 INTC: link 0x62 bitmap 0xdef8 INTD: link 0x63 bitmap 0xdef8 pciintr_link_fixup: PIRQ 0x00 already connected to IRQ 11 pciintr_link_fixup: PIRQ 0x03 already connected to IRQ 11 pciintr_link_fixup: PIRQ 0x01 already connected to IRQ 11 pciintr_link_fixup: PIRQ 0x02 not connected pciintr_link_fixup (stage 2): assigning IRQ 11 to PIRQ 0x02 pciintr_link_route: route of PIRQ 0x00 -> IRQ 11 preserved BIOS setting pciintr_link_route: route of PIRQ 0x03 -> IRQ 11 preserved BIOS setting pciintr_link_route: route of PIRQ 0x01 -> IRQ 11 preserved BIOS setting ------------------------------------------ device vendor product pin PIRQ IRQ stage ------------------------------------------ 000:02:0 0x104c 0xac16 A 0x00 11 0 fixed up 000:02:1 0x104c 0xac16 B 0x01 11 0 fixed up 000:03:0 0x10c8 0x0004 A 0x00 11 0 already assigned 000:07:2 0x8086 0x7112 D 0x03 11 0 already assigned ------------------------------------------ PCI fixup examining 8086:7192 PCI fixup examining 104c:ac16 PCI bridge 0: primary 0, secondary 1, subordinate 1 PCI fixup examining 104c:ac16 PCI bridge 1: primary 0, secondary 2, subordinate 2 PCI fixup examining 10c8:04 PCI fixup examining 8086:7110 PCI fixup examining 8086:7111 PCI fixup examining 8086:7112 PCI fixup examining 8086:7113 PCI bus #2 is the last bus Then, cbb0/1 were attached ok: cbb0 at pci0 dev 2 function 0: Texas Instruments PCI1250 PCI-CardBus Bridge (rev. 0x02) (chipflags 3) cbb0: socket base address 0x20301000 cbb0: intrpin A, intrtag 11 cbb1 at pci0 dev 2 function 1: Texas Instruments PCI1250 PCI-CardBus Bridge (rev. 0x02) (chipflags 3) cbb1: socket base address 0x20300000 cbb1: intrpin B, intrtag 11 CardBus latency timer 0xb0 (b0010100) PCI latency timer 0xa8 (82a808) pccbb_power: CARDBUS_VCC_0V and CARDBUS_VPP_0V [44] cbb0: interrupting at irq 11 cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 1 device 0 pcmcia0 at cardslot0 and finally: ex0 at cardbus1 dev 0 function 0: 3Com 3c575B-TX Ethernet Also a 16-bit card works too. -- Greg Troxel