sn2: disable non-display ROM resources
PATCH 1/1 sn2: 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.
Thanks,
Jesse
Signed-off-by Jesse Barnes <[email protected]>
===== arch/ia64/sn/io/machvec/pci_bus_cvlink.c 1.43 vs edited =====
arch/ia64/sn/io/machvec/pci_bus_cvlink.c +14 -1
@@ -357,7 +357,20 @@if (dev->resource[PCI_ROM_RESOURCE ].flags &IORESOURCE_MEM ) 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.