aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-08-26 13:49:22 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-26 13:49:22 -0400
commit755528c860b05fcecda1c88a2bdaffcb50760a7f (patch)
treed8b7aaaec93de93841b46e8e05a3b454d05bd357
parent26aad69e3dd854abe9028ca873fb40b410a39dd7 (diff)
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 resources. In the meantime, this has been reported to make X happier by Helge Hafting <helgehaf@aitel.hist.no>. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/pci/setup-res.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 84eedc965688..5598b4714f77 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
53 if (resno < 6) { 53 if (resno < 6) {
54 reg = PCI_BASE_ADDRESS_0 + 4 * resno; 54 reg = PCI_BASE_ADDRESS_0 + 4 * resno;
55 } else if (resno == PCI_ROM_RESOURCE) { 55 } else if (resno == PCI_ROM_RESOURCE) {
56 new |= res->flags & IORESOURCE_ROM_ENABLE; 56 if (!(res->flags & IORESOURCE_ROM_ENABLE))
57 return;
58 new |= PCI_ROM_ADDRESS_ENABLE;
57 reg = dev->rom_base_reg; 59 reg = dev->rom_base_reg;
58 } else { 60 } else {
59 /* Hmm, non-standard resource. */ 61 /* Hmm, non-standard resource. */