From owner-freebsd-acpi@FreeBSD.ORG Mon Nov 21 21:41:36 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 836BD16A422 for ; Mon, 21 Nov 2005 21:41:36 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id EEA6043D5A for ; Mon, 21 Nov 2005 21:41:17 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2382320 for multiple; Mon, 21 Nov 2005 16:41:24 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jALLfA99071763; Mon, 21 Nov 2005 16:41:10 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "O. Hartmann" Date: Mon, 21 Nov 2005 16:34:09 -0500 User-Agent: KMail/1.8.2 References: <200511171725.27877.jhb@freebsd.org> <200511211353.01664.jhb@freebsd.org> <43823759.3080506@mail.uni-mainz.de> In-Reply-To: <43823759.3080506@mail.uni-mainz.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511211634.10362.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-acpi@freebsd.org Subject: Re: [PATCH] Fix weird PCI bus numbers with pci_linkX X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 21:41:36 -0000 On Monday 21 November 2005 04:08 pm, O. Hartmann wrote: > John Baldwin wrote: > >On Thursday 17 November 2005 05:50 pm, John Baldwin wrote: > >>On Thursday 17 November 2005 05:32 pm, Nate Lawson wrote: > >>>John Baldwin wrote: > >>>>I think I figured out why some people get messages like: > >>>> > >>>>pci_linkX: BIOS IRQ 11 for -17777216.6.INTA is invalid > >>>> > >>>>I was not reading the bus number from the bridge device correctly (the > >>>>normal __BUS_ACCESSOR() macros assume that the passed in argument is a > >>>>child device, but at the time I'm reading the bus there is no child > >>>>device, so I was passing in the pcib device, the parent of the pcib > >>>>device probably returned an error, and the bus variable ended up being > >>>>some random stack garbage). The attached patch (also at URL) should fix > >>>>it I think. > >>>> > >>>>http://www.FreeBSD.org/~jhb/patches/acpi_pci_link.patch > >>> > >>>Excellent, patch looks good to me except the printf/panic message could > >>>be improved. > >> > >>I wanna see if it triggers first. > > > >So did anyone test this? I can't commit it unless someone tests it. > > What to do? > > Attached you will find two dmesg outputs. dmesg.old is done before the > pacth was included, dmesg.new is the one after the patch has been > applied. There seems to be a difference when my eyes hit the part where > the negative IRQ statemets are, so that seems to be only the half of the > way. What next? > > Hardware: ASUS A8N-SLI Deluxe, OS FreeBSD 6.0-STABLE, most recent > cvsupdated this morning 10 o'clock MET. There is quite a huge difference. Old: pci_link26: BIOS IRQ 11 for -2145794824.1.INTA is invalid pci_link21: BIOS IRQ 5 for -2145794824.2.INTA is invalid pci_link27: BIOS IRQ 3 for -2145794824.2.INTB is invalid pci_link23: BIOS IRQ 11 for -2145794824.10.INTA is invalid pci_link24: BIOS IRQ 3 for -2145794824.4.INTA is invalid pci_link29: BIOS IRQ 11 for -2145794824.7.INTA is invalid pci_link30: BIOS IRQ 5 for -2145794824.8.INTA is invalid ... pci_link17: BIOS IRQ 21 for 0.7.INTA is invalid pci_link18: BIOS IRQ 22 for 0.8.INTA is invalid pci_link19: BIOS IRQ 23 for 0.10.INTA is invalid New: pci_link26: BIOS IRQ 11 for 0.1.INTA is invalid pci_link21: BIOS IRQ 5 for 0.2.INTA is invalid pci_link27: BIOS IRQ 3 for 0.2.INTB is invalid pci_link23: BIOS IRQ 11 for 0.10.INTA is invalid pci_link24: BIOS IRQ 3 for 0.4.INTA is invalid pci_link29: BIOS IRQ 11 for 0.7.INTA is invalid pci_link30: BIOS IRQ 5 for 0.8.INTA is invalid ... pci_link16: BIOS IRQ 3 for 5.11.INTA is invalid This is much better. The bus number look sane, and now it is no longer complaining about 17, 18, and 19 having proper settings. The complaints are normal given that you have APIC enabled, so APIC is going to use different IRQs than the BIOS which doesn't use APIC. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org