Commit 5a42d2bc authored by Jesse Barnes's avatar Jesse Barnes Committed by Tony Luck

[IA64-SGI] Assign parent to PCI devices.

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.
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent ee134137
...@@ -290,6 +290,7 @@ sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -290,6 +290,7 @@ sn_pci_fixup_slot(struct pci_dev *dev)
addr |= __IA64_UNCACHED_OFFSET; addr |= __IA64_UNCACHED_OFFSET;
dev->resource[idx].start = addr; dev->resource[idx].start = addr;
dev->resource[idx].end = addr + size; dev->resource[idx].end = addr + size;
dev->resource[idx].parent = &ioport_resource;
} }
if (dev->resource[idx].flags & IORESOURCE_IO) if (dev->resource[idx].flags & IORESOURCE_IO)
...@@ -322,6 +323,7 @@ sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -322,6 +323,7 @@ sn_pci_fixup_slot(struct pci_dev *dev)
addr |= __IA64_UNCACHED_OFFSET; addr |= __IA64_UNCACHED_OFFSET;
dev->resource[idx].start = addr; dev->resource[idx].start = addr;
dev->resource[idx].end = addr + size; dev->resource[idx].end = addr + size;
dev->resource[idx].parent = &iomem_resource;
} }
if (dev->resource[idx].flags & IORESOURCE_MEM) if (dev->resource[idx].flags & IORESOURCE_MEM)
...@@ -351,6 +353,7 @@ sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -351,6 +353,7 @@ sn_pci_fixup_slot(struct pci_dev *dev)
addr |= __IA64_UNCACHED_OFFSET; addr |= __IA64_UNCACHED_OFFSET;
dev->resource[PCI_ROM_RESOURCE].start = addr; dev->resource[PCI_ROM_RESOURCE].start = addr;
dev->resource[PCI_ROM_RESOURCE].end = addr + size; dev->resource[PCI_ROM_RESOURCE].end = addr + size;
dev->resource[idx].parent = &iomem_resource;
if (dev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_MEM) if (dev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_MEM)
cmd |= PCI_COMMAND_MEMORY; cmd |= PCI_COMMAND_MEMORY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment