From owner-freebsd-mobile@FreeBSD.ORG Wed Jul 11 18:42:59 2007 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95F4E16A468 for ; Wed, 11 Jul 2007 18:42:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id C5CB513C44B for ; Wed, 11 Jul 2007 18:42:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l6BIgemJ086193; Wed, 11 Jul 2007 14:42:45 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Wed, 11 Jul 2007 14:31:52 -0400 User-Agent: KMail/1.9.6 References: <1183942480.6901.15.camel@joe.realss.com> <1184115985.13672.1.camel@joe.realss.com> <20070710.205634.756906935.imp@bsdimp.com> In-Reply-To: <20070710.205634.756906935.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707111431.52840.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 11 Jul 2007 14:42:50 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3637/Wed Jul 11 12:27:26 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-mobile@freebsd.org, smithi@nimnet.asn.au, zhangweiwu@realss.com Subject: Re: unable to map IRQ for my pccard 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, 11 Jul 2007 18:42:59 -0000 On Tuesday 10 July 2007 10:56:34 pm M. Warner Losh wrote: > In message: <1184115985.13672.1.camel@joe.realss.com> > Zhang Weiwu writes: > : On Tue, 2007-07-10 at 15:18 -0400, John Baldwin wrote: > : > On Sunday 08 July 2007 08:54:40 pm Zhang Weiwu wrote: > : > > > > cbb0: mem 0x20822000-0x20822fff at > : > > > > device 2.0 on pci0 pccard0: <16-bit PCCard bus> on cbb0 > : > > > > cbb1: mem 0x20821000-0x20821fff at > : > > > > device 2.1 on pci0 pccard1: <16-bit PCCard bus> on cbb1 > : > > > > $PIR: ROUTE_INTERRUPT failed. > : > > > > cbb: Unable to map IRQ... > : > > > > device_attach: cbb1 attach returned 12 > : > > : > We tried to set the IRQ for your device and the BIOS choked. Can you get the > : > output from /usr/src/tools/tools/pirtool for your machine? > : > : > : Thanks! Here is it: > : > : PCI Interrupt Routing Table at 0x000FB270 > : ----------------------------------------- > : 0x00: Signature: $PIR > : 0x04: Version: 1.0 > : 0x06: Size: 96 bytes (4 entries) > : 0x08: Device: 0:6:0 > : 0x0a: PCI Exclusive IRQs: 0x00000400 > : 0x0c: Compatible with: 0x00000000 unknown chipset > : 0x10: Miniport Data: 0x00000000 > : 0x1f: Checksum: 0x4D > : > : Entry 0: Device 0:6:0 Slot 0 (on-board) > : INTA: 60h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTB: 00h (not connected) > : INTC: 00h (not connected) > : INTD: 63h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : Entry 1: Device 0:2:0 Slot 0 (on-board) > : INTA: 60h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTB: 61h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTC: 00h (not connected) > : INTD: 00h (not connected) > : Entry 2: Device 0:3:0 Slot 0 (on-board) > : INTA: 60h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTB: 00h (not connected) > : INTC: 00h (not connected) > : INTD: 00h (not connected) > : Entry 3: Device 0:7:0 Slot 0 (on-board) > : INTA: 60h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTB: 61h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTC: 00h (not connected) > : INTD: 00h (not connected) > > consider: > > : cbb0: mem 0x20822000-0x20822fff at device 2.0 on pci0 > : pccard0: <16-bit PCCard bus> on cbb0 > : cbb1: mem 0x20821000-0x20821fff at device 2.1 on pci0 > : pccard1: <16-bit PCCard bus> on cbb1 > : $PIR: ROUTE_INTERRUPT failed. > : cbb: Unable to map IRQ... > : Entry 1: Device 0:2:0 Slot 0 (on-board) > : INTA: 60h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > : INTB: 61h routable irqs: 3 4 5 6 7 9 10 11 12 14 15 > > I think we're trying to rotue wire 0x60 twice. The second try seems > to be failing. No, we only route things once. Look at /sys/i386/pci/pci_pir.c. It keeps track of which IRQ a link is routed to, and we only use the BIOS call if it didn't look like the BIOS had already routed it, and we haven't routed it before. I think we are actually trying to route 0x61 btw, not 0x60 since it's device 2.1 (and thus probably INTB) that is keeling over. You can try using a hint like 'hw.pci0.2.INTB.irq=11' and seeing if it works. -- John Baldwin