X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Fxen%2Fpci.c;h=7494dbeb4409c0a6c10fc615f275e552fe3e0807;hb=0b97b03d88b40bfbd7ff0e069186a137d9786d43;hp=95ee4302ffb860c0fd4f5c948ccf63c3ca9856ef;hpb=4aad340f1b1930d42b3be25e0013fe7d7976f5be;p=cascardo%2Flinux.git diff --git a/drivers/xen/pci.c b/drivers/xen/pci.c index 95ee4302ffb8..7494dbeb4409 100644 --- a/drivers/xen/pci.c +++ b/drivers/xen/pci.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -67,12 +68,22 @@ static int xen_add_device(struct device *dev) #ifdef CONFIG_ACPI handle = ACPI_HANDLE(&pci_dev->dev); - if (!handle && pci_dev->bus->bridge) - handle = ACPI_HANDLE(pci_dev->bus->bridge); #ifdef CONFIG_PCI_IOV if (!handle && pci_dev->is_virtfn) handle = ACPI_HANDLE(physfn->bus->bridge); #endif + if (!handle) { + /* + * This device was not listed in the ACPI name space at + * all. Try to get acpi handle of parent pci bus. + */ + struct pci_bus *pbus; + for (pbus = pci_dev->bus; pbus; pbus = pbus->parent) { + handle = acpi_pci_get_bridge_handle(pbus); + if (handle) + break; + } + } if (handle) { acpi_status status;