From owner-freebsd-mobile Thu Jun 21 14:50:41 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 2E5C937B408; Thu, 21 Jun 2001 14:50:37 -0700 (PDT) (envelope-from msmith@mass.dis.org) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.4/8.11.3) with ESMTP id f5LM20w01556; Thu, 21 Jun 2001 15:02:00 -0700 (PDT) (envelope-from msmith@mass.dis.org) Message-Id: <200106212202.f5LM20w01556@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Warner Losh Cc: "Mike Atkinson" , freebsd-mobile@FreeBSD.ORG, msmith@FreeBSD.ORG Subject: Re: PCI -> PCMCIA -> Wavelan/IEEE In-reply-to: Your message of "Thu, 21 Jun 2001 10:27:40 MDT." <200106211627.f5LGReV89934@harmony.village.org> Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1597958760" Date: Thu, 21 Jun 2001 15:02:00 -0700 From: Mike Smith Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org This is a multipart MIME message. --==_Exmh_1597958760 Content-Type: text/plain; charset=us-ascii > In message <011a01c0fa2a$a322a120$1385f1d8@kconline.com> "Mike Atkinson" writes: > : Installing the pci_pci.c patch allowed pccbb0 to allocate memory but now > : there is a problem with allocating an IRQ: > : > : pccbb0: PCI memory allocated: 44000000 > : pci_cfgintr_unique: hard-routed to irq -1 > : pci_cfgintr: 0:30 INTC routed to irq -1 > : pcib1: routed slot 11 INTA to irq -1 > : pccbb: Unable to map IRQ... > : panic: resume_list_release: can't find resource > > Ugg. I don't know what that means. I've cc'd mike smith on this since > he wrote the interrupt routing code. It means I'm not checking the return value from ffs(). Whoops. This will prevent the panic, but it may not actually help. In the first case, we have a routing table entry for the slot, but there aren't any bits set for it, so we may not be able to route anything (it's possible that we can route an interrupt out of the for-PCI list if there's anything in it). This needs to be committed once the plaintiff has tested it. --==_Exmh_1597958760 Content-Type: text/plain ; name="pci.diff"; charset=us-ascii Content-Description: pci.diff Content-Disposition: attachment; filename="pci.diff" --- /sys/i386/pci/pci_cfgreg.c Wed Jun 20 18:09:26 2001 +++ pci_cfgreg.c Thu Jun 21 14:58:52 2001 @@ -249,8 +249,10 @@ if (powerof2(pe->pe_intpin[pin - 1].irqs)) { irq = ffs(pe->pe_intpin[pin - 1].irqs) - 1; - printf("pci_cfgintr_unique: hard-routed to irq %d\n", irq); - return(irq); + if (irq >= 0) { + printf("pci_cfgintr_unique: hard-routed to irq %d\n", irq); + return(irq); + } } return(255); } @@ -285,9 +287,11 @@ /* link destination mapped to a unique interrupt? */ if (powerof2(pi->irqs)) { irq = ffs(pi->irqs) - 1; - printf("pci_cfgintr_linked: linked (%x) to hard-routed irq %d\n", - pi->link, irq); - return(irq); + if (irq >= 0) { + printf("pci_cfgintr_linked: linked (%x) to hard-routed irq %d\n", + pi->link, irq); + return(irq); + } } /* look for the real PCI device that matches this table entry */ --==_Exmh_1597958760 Content-Type: text/plain; charset=us-ascii ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E --==_Exmh_1597958760-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message