Skip to contentSkip to conversation

provide PCI resources with a parent

PATCH New Jesse Barnes 1 participant 1 message Aug 6, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 provide PCI resources with a parent

In working on the patch to export PCI ROM space via sysfs, I found that the sn2 PCI code doesn't assign a parent resource to any of the PCI device resources as it builds them. This provides a simple fix for that problem.

Thanks,
Jesse

===== arch/ia64/sn/io/machvec/pci_bus_cvlink.c 1.42 vs edited =====

arch/ia64/sn/io/machvec/pci_bus_cvlink.c +3 -0
@@ -290,6 +290,7 @@
 			addr |= __IA64_UNCACHED_OFFSET;
 			dev->resource[idx].start = addr;
 			dev->resource[idx].end = addr + size;
+			dev->resource[idx].parent = &ioport_resource;
 		}
 
 		if (dev->resource[idx].flags & IORESOURCE_IO)
@@ -322,6 +323,7 @@
 			addr |= __IA64_UNCACHED_OFFSET;
 			dev->resource[idx].start = addr;
 			dev->resource[idx].end = addr + size;
+			dev->resource[idx].parent = &iomem_resource;
 		}
 
 		if (dev->resource[idx].flags & IORESOURCE_MEM)
@@ -351,6 +353,7 @@
                         addr |= __IA64_UNCACHED_OFFSET;
                         dev->resource[PCI_ROM_RESOURCE].start = addr;
                         dev->resource[PCI_ROM_RESOURCE].end = addr + size;
+			dev->resource[idx].parent = &iomem_resource;
                         if (dev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_MEM)
                                 cmd |= PCI_COMMAND_MEMORY;
                 }