[PATCH] Fix i450NX handling of PCI peer buses when BIOS reports them correctly

TJ ubuntu at tjworld.net
Thu Apr 10 23:03:41 UTC 2008


After posting my patch to linux-pci Matthew Wilcox looked at the issue
and came up with a two-line permanent fix in the ACPI code that doesn't
require matching DMI or anything else exotic.

Can we get Matthew's patch into hardy to deal with this?

TJ.

---

The PCI root bus that ACPI wants to scan may have already been discovered
by another means.  In the case of Bugzilla 10396, it was found by
pci_fixup_i450nx(), but there are many other ways to find root busses.

The problem is that pci_scan_bus() will return NULL both for busses
which don't exist and for busses which were already scanned.  We could
decide to make pci_scan_bus() return an ERR_PTR() to allow callers to
distinguish the two situations, but it is simpler for ACPI to check
whether the bus already exists.

Signed-off-by: Matthew Wilcox <willy at linux.intel.com>

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index c3fed31..954e314 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -302,6 +302,8 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device)
         * thus the root bridge's pci_dev does not exist).
         */
        root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus);
+       if (!root->bus)
+               root->bus = pci_find_bus(root->id.segment, root->id.bus);
        if (!root->bus) {
                printk(KERN_ERR PREFIX
                            "Bus %04x:%02x not present in PCI namespace\n",

--





More information about the kernel-team mailing list