diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-05 12:50:33 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-05 12:50:33 -0500 |
commit | c2d8c259bfce056437e8dbc4b048944050f9b567 (patch) | |
tree | 726e49653f7014bea034c59624ea23c21d6df13f /drivers/xen/xen-pciback/vpci.c | |
parent | e4de6c961cc8b688443c7989ae3e38d0518334a5 (diff) | |
parent | e5c5f2adeb370559f4b221d57214db85858b786a (diff) |
Merge branch 'devel/debug_ll_init' into next/multiplatform
* devel/debug_ll_init:
ARM: implement debug_ll_io_init()
+ sync to Linux 3.7-rc4
Diffstat (limited to 'drivers/xen/xen-pciback/vpci.c')
-rw-r--r-- | drivers/xen/xen-pciback/vpci.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/xen/xen-pciback/vpci.c b/drivers/xen/xen-pciback/vpci.c index 46d140baebd8..0f478ac483cd 100644 --- a/drivers/xen/xen-pciback/vpci.c +++ b/drivers/xen/xen-pciback/vpci.c | |||
@@ -89,9 +89,15 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, | |||
89 | 89 | ||
90 | mutex_lock(&vpci_dev->lock); | 90 | mutex_lock(&vpci_dev->lock); |
91 | 91 | ||
92 | /* Keep multi-function devices together on the virtual PCI bus */ | 92 | /* |
93 | for (slot = 0; slot < PCI_SLOT_MAX; slot++) { | 93 | * Keep multi-function devices together on the virtual PCI bus, except |
94 | if (!list_empty(&vpci_dev->dev_list[slot])) { | 94 | * virtual functions. |
95 | */ | ||
96 | if (!dev->is_virtfn) { | ||
97 | for (slot = 0; slot < PCI_SLOT_MAX; slot++) { | ||
98 | if (list_empty(&vpci_dev->dev_list[slot])) | ||
99 | continue; | ||
100 | |||
95 | t = list_entry(list_first(&vpci_dev->dev_list[slot]), | 101 | t = list_entry(list_first(&vpci_dev->dev_list[slot]), |
96 | struct pci_dev_entry, list); | 102 | struct pci_dev_entry, list); |
97 | 103 | ||
@@ -116,7 +122,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, | |||
116 | pci_name(dev), slot); | 122 | pci_name(dev), slot); |
117 | list_add_tail(&dev_entry->list, | 123 | list_add_tail(&dev_entry->list, |
118 | &vpci_dev->dev_list[slot]); | 124 | &vpci_dev->dev_list[slot]); |
119 | func = PCI_FUNC(dev->devfn); | 125 | func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn); |
120 | goto unlock; | 126 | goto unlock; |
121 | } | 127 | } |
122 | } | 128 | } |