public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@engr.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] sn2: disable non-display ROM resources
Date: Thu, 09 Sep 2004 18:51:08 +0000	[thread overview]
Message-ID: <200409091151.08990.jbarnes@engr.sgi.com> (raw)

[-- 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.

                 reply	other threads:[~2004-09-09 18:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200409091151.08990.jbarnes@engr.sgi.com \
    --to=jbarnes@engr.sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox