]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/commitdiff
xen/pci: pci_dev doesn't contain physfn unless CONFIG_PCI_IOV
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 7 Aug 2009 20:27:08 +0000 (13:27 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 7 Aug 2009 20:36:00 +0000 (13:36 -0700)
pci_dev's physfn field is only present when CONFIG_PCI_IOV is set.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/xen/pci.c

index b50548ff33e005fe088cfc1d0916f7c701e01144..b13e0546d8898918064533d77b7f9e074f08aa7f 100644 (file)
@@ -39,8 +39,10 @@ static int xen_add_device(struct device *dev)
                        .bus            = pci_dev->bus->number,
                        .devfn          = pci_dev->devfn,
                        .is_virtfn      = 1,
+#ifdef CONFIG_PCI_IOV
                        .physfn.bus     = pci_dev->physfn->bus->number,
                        .physfn.devfn   = pci_dev->physfn->devfn,
+#endif
                };
 
                r = HYPERVISOR_physdev_op(PHYSDEVOP_manage_pci_add_ext,