public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sn2: disable non-display ROM resources
@ 2004-09-09 18:51 Jesse Barnes
  0 siblings, 0 replies; only message in thread
From: Jesse Barnes @ 2004-09-09 18:51 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

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 <jbarnes@sgi.com>

[-- Attachment #2: disable-non-vga-roms.patch --]
[-- Type: text/plain, Size: 873 bytes --]

===== arch/ia64/sn/io/machvec/pci_bus_cvlink.c 1.43 vs edited =====
--- 1.43/arch/ia64/sn/io/machvec/pci_bus_cvlink.c	2004-08-18 09:38:41 -07:00
+++ edited/arch/ia64/sn/io/machvec/pci_bus_cvlink.c	2004-09-09 09:43:10 -07:00
@@ -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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-09 18:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-09 18:51 [PATCH] sn2: disable non-display ROM resources Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox