tree d8b7aaaec93de93841b46e8e05a3b454d05bd357
parent 26aad69e3dd854abe9028ca873fb40b410a39dd7
author Linus Torvalds <[EMAIL PROTECTED]> Sat, 27 Aug 2005 00:49:22 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 27 Aug 2005 00:49:22 -0700

Ignore disabled ROM resources at setup

Writing even a disabled value seems to mess up some matrox graphics
cards.  It may be a card-related issue, but we may also be writing
reserved low bits in the result.

This was a fall-out of switching x86 over to the generic PCI resource
allocation code, and needs more debugging.  In particular, the old x86
code defaulted to not doing any resource allocations at all for ROM

In the meantime, this has been reported to make X happier by Helge

Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/pci/setup-res.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to