lkml.org 
[lkml]   [2005]   [Aug]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 23 Aug 2005 23:04:52 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: rc6 keeps hanging and blanking displays

On Mon, 22 Aug 2005, Linus Torvalds wrote:
> 
> But disabling the ROM assignment might be a good idea. Almost nobody ever 
> really wants to assign the ROM anyway, and there are cards where there are 
> some strange rules about ROM alignment (read: doesn't follow spec).

Here's an even better idea.

Let's do the assignment internally in the kernel, but just not write it to 
the device unless it's actually enabled. IOW, we'll be doing all the 
resource allocation, but devices won't be affected. Modern lspci versions 
will show this as a "[virtual] Expansion ROM".

The patch might look something like this. Helge, does this make any 
difference?
Ivan, opinions?

		Linus
---
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev,
 	if (resno < 6) {
 		reg = PCI_BASE_ADDRESS_0 + 4 * resno;
 	} else if (resno == PCI_ROM_RESOURCE) {
-		new |= res->flags & IORESOURCE_ROM_ENABLE;
+		if (!(res->flags & IORESOURCE_ROM_ENABLE))
+			return;
+		new |= PCI_ROM_ADDRESS_ENABLE;
 		reg = dev->rom_base_reg;
 	} else {
 		/* Hmm, non-standard resource. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-24 08:09    [from the cache]
©2003-2008