Commit 2cb7bcfc authored by Jesse Barnes's avatar Jesse Barnes Committed by David Mosberger

[IA64-SGI]: disable non-display ROM resources

 
This patch is needed to correctly support the new sysfs rom file.  On sn2, we
only allocate PIO space for display option ROMs since PIO space is a
relatively scarce resource (we've seen exhaustion when running with several
qla cards in the same domain).  And without this patch we won't zero out
non-display ROM resources which can lead to panics if anyone tries to use the
bogus addresses left over there from the generic PCI probing code.
Signed-off-by: default avatarJesse Barnes <jbarnes@sgi.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent c25d7a07
...@@ -357,7 +357,20 @@ sn_pci_fixup_slot(struct pci_dev *dev) ...@@ -357,7 +357,20 @@ sn_pci_fixup_slot(struct pci_dev *dev)
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;
} }
} } else {
/*
* Remove other ROM resources since they don't have valid
* CPU addresses.
*/
size = dev->resource[PCI_ROM_RESOURCE].end -
dev->resource[PCI_ROM_RESOURCE].start;
if (size) {
dev->resource[PCI_ROM_RESOURCE].start = 0;
dev->resource[PCI_ROM_RESOURCE].end = 0;
dev->resource[PCI_ROM_RESOURCE].flags = 0;
}
}
/* /*
* Update the Command Word on the Card. * Update the Command Word on the Card.
......
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