From owner-cvs-src@FreeBSD.ORG Mon Nov 21 22:01:19 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B40F816A41F; Mon, 21 Nov 2005 22:01:19 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9034C43D8D; Mon, 21 Nov 2005 22:01:18 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jALM1GoO080942; Mon, 21 Nov 2005 22:01:16 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jALM1Ggp080941; Mon, 21 Nov 2005 22:01:16 GMT (envelope-from jhb) Message-Id: <200511212201.jALM1Ggp080941@repoman.freebsd.org> From: John Baldwin Date: Mon, 21 Nov 2005 22:01:16 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/acpica acpi_pci_link.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 22:01:19 -0000 jhb 2005-11-21 22:01:16 UTC FreeBSD src repository Modified files: sys/dev/acpica acpi_pci_link.c Log: Fix the code to look up the BIOS IRQ for a given link device by reading the IRQ set by the BIOS in existing devices to actually get the correct bus number of the child PCI bus. I was not reading the bus number from the bridge device correctly. The __BUS_ACCESSOR() macros (from which pcib_get_bus() is built) assume that the passed in argument is a child device. However, at the time I'm reading the bus there is no child device yet, so I was passing in the pcib device as the child device. The parent of the pcib device probably returned an error in the case of a host bridge, thus resulting in random stack garbage for the bus number. For PCI-PCI bridges, the bus number being used was actually the subvendor of the PCI-PCI bridge device itself. MFC after: 1 week Revision Changes Path 1.49 +15 -3 src/sys/dev/acpica/acpi_pci_link.c