Thread (53 messages) flat view 53 messages, 7 authors, 2014-07-14
STALE4458d

Revision v3 of 5 in this series.

Revisions (5)
  1. v3 current
  2. v13 [diff vs current]
  3. v14 [diff vs current]
  4. v15 [diff vs current]
  5. v16 [diff vs current]

[RFC PATCH V3 03/17] ppc/pci: don't unset pci resources for VFs

From: Wei Yang <hidden>
Date: 2014-06-10 01:57:03
Also in: linux-pci
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

When the PCI_REASSIGN_ALL_RSRC is set, each resource for a pci_dev will be
unset. which means the pci core will reassign those resources.

While this behavior will clean up the resources information for VFs, whose
value is calculated in virtfn_add.

This patch adds a condition. If the pci_dev is a VF, skip the resource
unset process.

Signed-off-by: Wei Yang <redacted>
---
 arch/powerpc/kernel/pci-common.c |    6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index d9476c1..c449a26 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -824,6 +824,12 @@ static void pcibios_fixup_resources(struct pci_dev *dev)
 		       pci_name(dev));
 		return;
 	}
+
+#ifdef CONFIG_PCI_IOV
+	if (dev->is_virtfn)
+		return;
+#endif
+
 	for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
 		struct resource *res = dev->resource + i;
 		struct pci_bus_region reg;
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help