diff options
| -rw-r--r-- | drivers/xen/pci.c | 15 |
1 files changed, 13 insertions, 2 deletions
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 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
| 21 | #include <linux/acpi.h> | 21 | #include <linux/acpi.h> |
| 22 | #include <linux/pci-acpi.h> | ||
| 22 | #include <xen/xen.h> | 23 | #include <xen/xen.h> |
| 23 | #include <xen/interface/physdev.h> | 24 | #include <xen/interface/physdev.h> |
| 24 | #include <xen/interface/xen.h> | 25 | #include <xen/interface/xen.h> |
| @@ -67,12 +68,22 @@ static int xen_add_device(struct device *dev) | |||
| 67 | 68 | ||
| 68 | #ifdef CONFIG_ACPI | 69 | #ifdef CONFIG_ACPI |
| 69 | handle = ACPI_HANDLE(&pci_dev->dev); | 70 | handle = ACPI_HANDLE(&pci_dev->dev); |
| 70 | if (!handle && pci_dev->bus->bridge) | ||
| 71 | handle = ACPI_HANDLE(pci_dev->bus->bridge); | ||
| 72 | #ifdef CONFIG_PCI_IOV | 71 | #ifdef CONFIG_PCI_IOV |
| 73 | if (!handle && pci_dev->is_virtfn) | 72 | if (!handle && pci_dev->is_virtfn) |
| 74 | handle = ACPI_HANDLE(physfn->bus->bridge); | 73 | handle = ACPI_HANDLE(physfn->bus->bridge); |
| 75 | #endif | 74 | #endif |
| 75 | if (!handle) { | ||
| 76 | /* | ||
| 77 | * This device was not listed in the ACPI name space at | ||
| 78 | * all. Try to get acpi handle of parent pci bus. | ||
| 79 | */ | ||
| 80 | struct pci_bus *pbus; | ||
| 81 | for (pbus = pci_dev->bus; pbus; pbus = pbus->parent) { | ||
| 82 | handle = acpi_pci_get_bridge_handle(pbus); | ||
| 83 | if (handle) | ||
| 84 | break; | ||
| 85 | } | ||
| 86 | } | ||
| 76 | if (handle) { | 87 | if (handle) { |
| 77 | acpi_status status; | 88 | acpi_status status; |
| 78 | 89 | ||
