Skip to content

Commit

Permalink
xen/pci: Check for PCI bridge before using it.
Browse files Browse the repository at this point in the history
Some SR-IOV devices may use more than one bus number, but there is no real bridges
because that have internal routing mechanism. So need to check whether the bridge is
existing before using it.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Zhang, Yang Z authored and Konrad Rzeszutek Wilk committed May 30, 2012
1 parent 5e152e6 commit 780dbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static int xen_add_device(struct device *dev)

#ifdef CONFIG_ACPI
handle = DEVICE_ACPI_HANDLE(&pci_dev->dev);
if (!handle)
if (!handle && pci_dev->bus->bridge)
handle = DEVICE_ACPI_HANDLE(pci_dev->bus->bridge);
#ifdef CONFIG_PCI_IOV
if (!handle && pci_dev->is_virtfn)
Expand Down

0 comments on commit 780dbcd

Please sign in to comment.